
/* =====================================================
   DUCHESS AI — LUXURY CHAT WIDGET
===================================================== */

:root {
    --duchess-ai-black: #11110f;
    --duchess-ai-panel: #191916;
    --duchess-ai-gold: #c6a15b;
    --duchess-ai-gold-light: #d8ba78;
    --duchess-ai-white: #f8f6f1;
    --duchess-ai-muted: #aaa69c;
    --duchess-ai-border: rgba(198, 161, 91, 0.25);
}

/* Floating launcher */

.duchess-ai-launcher {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 9998;

    width: 62px;
    height: 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--duchess-ai-gold-light);
    border-radius: 50%;

    background: linear-gradient(
        145deg,
        var(--duchess-ai-gold-light),
        var(--duchess-ai-gold)
    );

    color: var(--duchess-ai-black);
    font-size: 27px;

    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.duchess-ai-launcher:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(198, 161, 91, 0.3);
}

.duchess-ai-launcher:focus-visible,
.duchess-ai-close:focus-visible,
.duchess-ai-send:focus-visible {
    outline: 2px solid var(--duchess-ai-gold-light);
    outline-offset: 3px;
}

/* Chat window */

.duchess-ai-window {
    position: fixed;
    right: 26px;
    bottom: 102px;
    z-index: 9999;

    width: 390px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: min(680px, calc(100dvh - 130px));

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: var(--duchess-ai-black);
    color: var(--duchess-ai-white);

    border: 1px solid var(--duchess-ai-border);
    border-radius: 16px;

    box-shadow: 0 20px 65px rgba(0, 0, 0, 0.45);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(15px) scale(0.98);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.duchess-ai-window.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* Header */

.duchess-ai-header {
    min-height: 82px;
    padding: 17px 19px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: linear-gradient(
        120deg,
        #1e1c17,
        #11110f
    );

    border-bottom: 1px solid var(--duchess-ai-border);
}

.duchess-ai-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.duchess-ai-logo {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--duchess-ai-gold);
    border-radius: 50%;

    color: var(--duchess-ai-gold-light);
    font-size: 23px;
}

.duchess-ai-brand h3 {
    margin: 0;
    color: var(--duchess-ai-white);
    font-family: Georgia, serif;
    font-size: 17px;
    font-weight: 500;
}

.duchess-ai-brand p {
    margin: 4px 0 0;
    color: var(--duchess-ai-muted);
    font-size: 10px;
    letter-spacing: 0.4px;
}

.duchess-ai-close {
    width: 34px;
    height: 34px;

    border: none;
    background: transparent;
    color: var(--duchess-ai-muted);

    font-size: 25px;
    cursor: pointer;
}

.duchess-ai-close:hover {
    color: var(--duchess-ai-gold-light);
}

/* Messages */

.duchess-ai-messages {
    flex: 1;
    min-height: 0;

    display: flex;
    flex-direction: column;
    gap: 15px;

    padding: 20px 16px;

    overflow-y: auto;
    overscroll-behavior: contain;

    scrollbar-width: thin;
    scrollbar-color: var(--duchess-ai-gold) transparent;
}

.duchess-ai-message {
    max-width: 88%;
    padding: 12px 14px;

    border-radius: 12px;

    font-size: 13px;
    line-height: 1.65;

    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.duchess-ai-message.assistant {
    align-self: flex-start;

    background: var(--duchess-ai-panel);
    border: 1px solid rgba(255, 255, 255, 0.06);

    color: var(--duchess-ai-white);

    border-bottom-left-radius: 3px;
}

.duchess-ai-message.user {
    align-self: flex-end;

    background: #493a20;
    border: 1px solid rgba(198, 161, 91, 0.3);

    color: var(--duchess-ai-white);

    border-bottom-right-radius: 3px;
}

/* Suggested questions */

.duchess-ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;

    padding: 0 16px 15px;
}

.duchess-ai-suggestion {
    padding: 8px 11px;

    border: 1px solid var(--duchess-ai-border);
    border-radius: 20px;

    background: transparent;
    color: var(--duchess-ai-gold-light);

    font-size: 11px;
    cursor: pointer;

    transition: background 0.2s ease;
}

.duchess-ai-suggestion:hover {
    background: rgba(198, 161, 91, 0.12);
}

/* Typing indicator */

.duchess-ai-typing {
    align-self: flex-start;

    padding: 12px 15px;

    background: var(--duchess-ai-panel);
    border-radius: 12px;

    color: var(--duchess-ai-gold-light);
    font-size: 12px;
}

.duchess-ai-typing span {
    display: inline-block;
    animation: duchess-ai-bounce 1s infinite;
}

.duchess-ai-typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.duchess-ai-typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes duchess-ai-bounce {
    0%, 60%, 100% {
        opacity: 0.35;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

/* Input area */

.duchess-ai-input-area {
    padding: 14px;

    background: #171713;
    border-top: 1px solid var(--duchess-ai-border);
}

.duchess-ai-input-row {
    display: flex;
    align-items: flex-end;
    gap: 9px;
}

.duchess-ai-input {
    flex: 1;
    min-width: 0;
    min-height: 43px;
    max-height: 100px;

    resize: none;

    padding: 12px 13px;

    border: 1px solid rgba(198, 161, 91, 0.25);
    border-radius: 9px;

    background: #22221e;
    color: var(--duchess-ai-white);

    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;

    outline: none;
}

.duchess-ai-input::placeholder {
    color: #888479;
}

.duchess-ai-input:focus {
    border-color: var(--duchess-ai-gold);
}

.duchess-ai-send {
    width: 43px;
    height: 43px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: none;
    border-radius: 9px;

    background: var(--duchess-ai-gold);
    color: var(--duchess-ai-black);

    font-size: 19px;
    cursor: pointer;

    transition: background 0.2s ease;
}

.duchess-ai-send:hover {
    background: var(--duchess-ai-gold-light);
}

.duchess-ai-send:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.duchess-ai-disclaimer {
    margin: 9px 0 0;

    color: #817d73;
    font-size: 9px;
    text-align: center;
}

/* Mobile */

@media (max-width: 480px) {
    .duchess-ai-launcher {
        right: 17px;
        bottom: 17px;

        width: 56px;
        height: 56px;
    }

    .duchess-ai-window {
        right: 10px;
        bottom: 82px;

        width: calc(100vw - 20px);
        max-width: none;

        height: min(590px, calc(100dvh - 105px));
        max-height: none;

        border-radius: 13px;
    }

    .duchess-ai-header {
        min-height: 74px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .duchess-ai-window,
    .duchess-ai-launcher {
        transition: none;
    }

    .duchess-ai-typing span {
        animation: none;
    }
}


/* =====================================================
   DUCHESS AI — AI DISCLOSURE POPUP
===================================================== */

.duchess-ai-disclosure {
    position: fixed;
    inset: 0;
    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
}

.duchess-ai-disclosure.is-hidden {
    display: none;
}

.duchess-ai-disclosure-card {
    width: 100%;
    max-width: 440px;

    padding: 38px 32px;

    background: #11110f;
    border: 1px solid rgba(198, 161, 91, 0.4);
    border-radius: 14px;

    color: #f8f6f1;
    text-align: center;

    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);

    animation: duchess-disclosure-enter 0.35s ease;
}

@keyframes duchess-disclosure-enter {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.duchess-ai-disclosure-logo {
    color: #d8ba78;
    font-size: 42px;
    margin-bottom: 15px;
}

.duchess-ai-eyebrow {
    color: #c6a15b;
    font-size: 9px;
    letter-spacing: 2px;
    line-height: 1.7;
}

.duchess-ai-disclosure-card h2 {
    margin: 13px 0;
    color: #d8ba78;
    font-family: Georgia, serif;
    font-size: 30px;
    font-weight: 400;
}

.duchess-ai-disclosure-divider {
    width: 48px;
    height: 1px;
    margin: 20px auto;
    background: #c6a15b;
}

.duchess-ai-disclosure-card h3 {
    color: #f8f6f1;
    font-family: Georgia, serif;
    font-size: 19px;
    font-weight: 400;
    line-height: 1.5;
}

.duchess-ai-disclosure-card > p:not(.duchess-ai-eyebrow) {
    color: #c0bcb2;
    font-size: 13px;
    line-height: 1.8;
}

.duchess-ai-disclosure-note {
    margin: 24px 0;
    padding: 15px;

    background: #211f1a;
    border: 1px solid rgba(198, 161, 91, 0.15);
    border-radius: 8px;

    text-align: left;
}

.duchess-ai-disclosure-note strong {
    color: #d8ba78;
    font-size: 10px;
    letter-spacing: 1px;
}

.duchess-ai-disclosure-note p {
    margin: 8px 0 0;
    color: #c0bcb2;
    font-size: 11px;
    line-height: 1.7;
}

.duchess-ai-disclosure-button {
    width: 100%;
    padding: 15px;

    background: #c6a15b;
    border: 1px solid #d8ba78;
    border-radius: 5px;

    color: #11110f;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;
    transition: background 0.2s ease;
}

.duchess-ai-disclosure-button:hover {
    background: #d8ba78;
}

.duchess-ai-disclosure-button:focus-visible {
    outline: 2px solid #d8ba78;
    outline-offset: 4px;
}

@media (max-width: 480px) {
    .duchess-ai-disclosure-card {
        padding: 30px 23px;
    }

    .duchess-ai-disclosure-card h2 {
        font-size: 27px;
    }
}


/* =====================================================
   DUCHESS AI — FLOATING INTRODUCTION NOTICE
===================================================== */

.duchess-ai-notice {
    position: fixed;
    right: 24px;
    bottom: 105px;
    z-index: 9998;

    width: 310px;
    padding: 19px;

    background: #11110f;
    color: #f8f6f1;

    border: 1px solid rgba(198, 161, 91, 0.5);
    border-radius: 12px;

    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);

    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);

    transition:
        opacity 0.35s ease,
        transform 0.35s ease,
        visibility 0.35s ease;
}

.duchess-ai-notice.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.duchess-ai-notice.is-hidden {
    display: none;
}

.duchess-ai-notice-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    padding-right: 15px;
}

.duchess-ai-notice-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #c6a15b;
    color: #11110f;
    border-radius: 50%;
    font-size: 21px;
}

.duchess-ai-notice-heading strong {
    display: block;
    color: #d8ba78;
    font-family: Georgia, serif;
    font-size: 15px;
    font-weight: 400;
}

.duchess-ai-notice-heading span:last-child {
    display: block;
    margin-top: 4px;
    color: #aaa69d;
    font-size: 10px;
}

.duchess-ai-notice > p {
    margin: 15px 0 12px;
    color: #e4e0d8;
    font-size: 12px;
    line-height: 1.7;
}

.duchess-ai-notice > small {
    display: block;
    padding-top: 10px;
    border-top: 1px solid rgba(198, 161, 91, 0.2);

    color: #aaa69d;
    font-size: 9px;
    line-height: 1.6;
}

.duchess-ai-notice-close {
    position: absolute;
    top: 9px;
    right: 11px;

    padding: 2px 5px;
    background: transparent;
    border: none;

    color: #aaa69d;
    font-size: 19px;
    cursor: pointer;
}

.duchess-ai-notice-close:hover {
    color: #d8ba78;
}

@media (max-width: 480px) {
    .duchess-ai-notice {
        right: 16px;
        bottom: 95px;
        width: min(310px, calc(100vw - 32px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .duchess-ai-notice {
        transition: none;
    }
}
