/* "Ask Amour" chat widget. Uses the site's colour variables, so the High contrast switch applies to it too. */
.chat-widget {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 1500;
    font-family: inherit;
}

.chat-launcher {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0 1.25rem;
    border-radius: 999px;
    background: #1a1a1a;
    color: #ffffff;
    border: 2px solid var(--pink);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.chat-widget.is-open .chat-launcher { display: none; }

.chat-panel {
    display: flex;
    flex-direction: column;
    width: 360px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 40px);
    background: #ffffff;
    color: var(--text-dark, #1a1a1a);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.chat-panel[hidden] { display: none; }

.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--text-dark, #1a1a1a);
    color: #ffffff;
}

.chat-title { margin: 0; font-size: 1.05rem; color: #ffffff; }

.chat-close {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #ffffff;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.chat-close:hover { background: rgba(255, 255, 255, 0.15); }

.chat-notice {
    margin: 0;
    padding: 0.6rem 1rem;
    background: #f1f3f5;
    color: #333333;
    font-size: 0.8rem;
    line-height: 1.4;
}

.chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-msg { display: flex; }
.chat-msg--user { justify-content: flex-end; }

.chat-bubble {
    max-width: 85%;
    padding: 0.6rem 0.9rem;
    border-radius: 14px;
    line-height: 1.5;
    font-size: 0.95rem;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat-msg--assistant .chat-bubble { background: #f1f3f5; color: #1a1a1a; border-bottom-left-radius: 4px; }
.chat-msg--user .chat-bubble { background: #ffe0ec; color: #1a1a1a; border-bottom-right-radius: 4px; }
.chat-bubble a { color: inherit; text-decoration: underline; font-weight: 600; }
.chat-msg--assistant .chat-bubble a { color: #1a1a1a; }


.chat-suggestions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.25rem 0 0; }
.chat-suggestions[hidden] { display: none; }

.chat-suggestion {
    padding: 0.5rem 0.8rem;
    border: 2px solid var(--pink);
    border-radius: 999px;
    background: #ffffff;
    color: #1a1a1a;
    font: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}

.chat-suggestion:hover { background: #fff0f5; }

.chat-form { display: flex; gap: 0.5rem; padding: 0.75rem 1rem 1rem; border-top: 1px solid #e3e6e8; }

.chat-input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    padding: 0 0.9rem;
    border: 2px solid #767676;
    border-radius: 10px;
    font: inherit;
    font-size: 1rem;
    color: #1a1a1a;
    background: #ffffff;
}

.chat-send {
    min-height: 44px;
    padding: 0 1.1rem;
    border: none;
    border-radius: 10px;
    background: #1a1a1a;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.chat-send:disabled { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 480px) {
    .chat-widget { left: 12px; bottom: 12px; }
    .chat-panel { width: calc(100vw - 24px); max-width: none; height: min(520px, calc(100vh - 24px)); }
    .chat-launcher-label { display: none; }
    .chat-launcher { width: 52px; height: 52px; padding: 0; justify-content: center; }
}

@media print { .chat-widget { display: none; } }
