/* assets/css/glamour-chatbot.css */

.glamour-chatbot {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 9998;
    width: min(420px, calc(100vw - 28px));
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px) scale(0.98);
    transition: all 0.25s ease;
}

.glamour-chatbot.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.glamour-chatbot-panel {
    background:
            radial-gradient(circle at top left, rgba(196, 150, 66, 0.22), transparent 34%),
            linear-gradient(145deg, rgba(6, 10, 20, 0.98), rgba(2, 4, 10, 0.98));
    border: 1px solid rgba(214, 174, 94, 0.32);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px);
}

.glamour-chatbot-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glamour-chatbot-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #d6ae5e;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.glamour-chatbot-header h4 {
    color: #ffffff;
    margin: 0 0 4px;
    font-family: "Cormorant Garamond", serif;
    font-size: 24px;
    font-weight: 700;
}

.glamour-chatbot-header p {
    color: rgba(255, 255, 255, 0.68);
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

.glamour-chatbot-close {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glamour-chatbot-close:hover {
    background: rgba(214, 174, 94, 0.18);
    border-color: rgba(214, 174, 94, 0.45);
}

.glamour-chatbot-body {
    height: 360px;
    overflow-y: auto;
    padding: 18px;
    scrollbar-width: thin;
}

.glamour-chatbot-message {
    display: flex;
    margin-bottom: 12px;
}

.glamour-chatbot-message.user {
    justify-content: flex-end;
}

.glamour-chatbot-message.bot,
.glamour-chatbot-message.ai {
    justify-content: flex-start;
}

.glamour-chatbot-bubble {
    max-width: 82%;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.55;
    white-space: pre-wrap;
}

.glamour-chatbot-message.user .glamour-chatbot-bubble {
    background: linear-gradient(135deg, #d6ae5e, #b88935);
    color: #07101d;
    border-bottom-right-radius: 6px;
    font-weight: 600;
}

.glamour-chatbot-message.bot .glamour-chatbot-bubble,
.glamour-chatbot-message.ai .glamour-chatbot-bubble {
    background: rgba(255, 255, 255, 0.075);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 6px;
}

.glamour-chatbot-message.loading .glamour-chatbot-bubble {
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.glamour-chatbot-quick-actions {
    display: flex;
    gap: 8px;
    padding: 0 18px 14px;
    overflow-x: auto;
}

.glamour-chatbot-quick-actions button {
    flex: 0 0 auto;
    border: 1px solid rgba(214, 174, 94, 0.28);
    background: rgba(214, 174, 94, 0.08);
    color: rgba(255, 255, 255, 0.88);
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glamour-chatbot-quick-actions button:hover {
    background: rgba(214, 174, 94, 0.18);
    color: #ffffff;
}

.glamour-chatbot-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
}

.glamour-chatbot-form textarea {
    flex: 1;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    outline: none;
    border-radius: 16px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 14px;
    line-height: 1.45;
}

.glamour-chatbot-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.glamour-chatbot-form textarea:focus {
    border-color: rgba(214, 174, 94, 0.5);
    box-shadow: 0 0 0 3px rgba(214, 174, 94, 0.1);
}

.glamour-chatbot-form button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #d6ae5e, #b88935);
    color: #06101d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glamour-chatbot-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(214, 174, 94, 0.24);
}

.glamour-chatbot-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.glamour-chatbot-note {
    padding: 0 16px 14px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11px;
    text-align: center;
}

@media (max-width: 575px) {
    .glamour-chatbot {
        right: 14px;
        bottom: 86px;
        width: calc(100vw - 28px);
    }

    .glamour-chatbot-body {
        height: 340px;
    }

    .glamour-chatbot-header h4 {
        font-size: 22px;
    }
}

.glamour-chatbot-cards {
    width: 88%;
    display: grid;
    gap: 10px;
}

.glamour-chatbot-cards-title {
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
    margin-bottom: 2px;
}

.glamour-chatbot-property-card {
    display: block;
    text-decoration: none;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(214, 174, 94, 0.24);
    transition: all 0.2s ease;
}

.glamour-chatbot-property-card:hover {
    transform: translateY(-1px);
    background: rgba(214, 174, 94, 0.12);
    border-color: rgba(214, 174, 94, 0.45);
}

.glamour-chatbot-property-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.glamour-chatbot-property-card-top strong {
    color: #ffffff;
    font-size: 13px;
    line-height: 1.35;
}

.glamour-chatbot-property-card-top span {
    color: #d6ae5e;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.glamour-chatbot-property-location {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    margin-bottom: 4px;
}

.glamour-chatbot-property-meta {
    color: rgba(255, 255, 255, 0.52);
    font-size: 11px;
    margin-bottom: 8px;
}

.glamour-chatbot-property-link {
    color: #d6ae5e;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.glamour-chatbot-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.glamour-chatbot-reset {
    height: 34px;
    border: 1px solid rgba(214, 174, 94, 0.28);
    border-radius: 999px;
    background: rgba(214, 174, 94, 0.08);
    color: rgba(255, 255, 255, 0.82);
    padding: 0 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.glamour-chatbot-reset:hover {
    background: rgba(214, 174, 94, 0.18);
    border-color: rgba(214, 174, 94, 0.45);
    color: #ffffff;
}

/* =========================================================
   Glamour Chatbot Mobile Fix
   ========================================================= */

@media (max-width: 767px) {
    .glamour-chatbot {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        z-index: 99999;
        pointer-events: none;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding: 0;
    }

    .glamour-chatbot.is-open {
        pointer-events: auto;
    }

    .glamour-chatbot-panel {
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        margin: 0;
    }

    .glamour-chatbot-header {
        flex: 0 0 auto;
        padding: 12px 14px;
        gap: 10px;
        align-items: flex-start;
    }

    .glamour-chatbot-header h4 {
        font-size: 16px;
        line-height: 1.2;
        margin: 2px 0 4px;
    }

    .glamour-chatbot-header p {
        font-size: 12px;
        line-height: 1.35;
        margin: 0;
    }

    .glamour-chatbot-kicker {
        font-size: 11px;
    }

    .glamour-chatbot-header-actions {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .glamour-chatbot-reset {
        min-width: auto;
        padding: 7px 9px;
        font-size: 11px;
        white-space: nowrap;
        border-radius: 999px;
    }

    .glamour-chatbot-close {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .glamour-chatbot-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        padding: 12px 12px 10px;
        -webkit-overflow-scrolling: touch;
    }

    .glamour-chatbot-message {
        max-width: 100%;
    }

    .glamour-chatbot-bubble {
        max-width: 88%;
        font-size: 14px;
        line-height: 1.55;
        word-break: break-word;
    }

    .glamour-chatbot-message.user .glamour-chatbot-bubble {
        max-width: 86%;
    }

    .glamour-chatbot-cards {
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }

    .glamour-chatbot-property-card {
        width: 100%;
        max-width: 100%;
    }

    .glamour-chatbot-quick-actions {
        flex: 0 0 auto;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 10px 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .glamour-chatbot-quick-actions button {
        width: 100%;
        min-width: 0;
        padding: 9px 8px;
        font-size: 12px;
        line-height: 1.2;
        white-space: nowrap;
        border-radius: 999px;
    }

    .glamour-chatbot-form {
        flex: 0 0 auto;
        display: flex;
        align-items: flex-end;
        gap: 8px;
        padding: 10px 12px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        background: inherit;
    }

    .glamour-chatbot-form textarea {
        flex: 1 1 auto;
        min-width: 0;
        max-height: 90px;
        min-height: 42px;
        font-size: 14px;
        line-height: 1.4;
        resize: none;
    }

    .glamour-chatbot-form button,
    #glamourChatbotSend {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    .glamour-chatbot-note {
        display: none;
    }
}

/* Smaller phones */
@media (max-width: 380px) {
    .glamour-chatbot-header {
        padding: 10px 12px;
    }

    .glamour-chatbot-header p {
        display: none;
    }

    .glamour-chatbot-quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        padding: 8px 10px;
    }

    .glamour-chatbot-quick-actions button {
        font-size: 11px;
        padding: 8px 6px;
    }

    .glamour-chatbot-form {
        padding: 8px 10px;
        padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
}