/* AI Concierge component styles */

.ai-concierge {
    position: fixed;
    bottom: max(20px, env(safe-area-inset-bottom));
    right: max(20px, env(safe-area-inset-right));
    z-index: 1000;
    transition: transform 0.28s ease, bottom 0.28s ease, right 0.28s ease;
}

body.back-to-top-active .ai-concierge {
    transform: translateY(-72px);
}

.ai-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(184, 155, 94, 0.86) 0%, rgba(212, 175, 55, 0.8) 100%);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: #020617;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26), 0 0 14px rgba(184, 155, 94, 0.14);
    position: relative;
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, filter 0.24s ease;
    isolation: isolate;
    overflow: hidden;
    animation: aiBreath 10s ease-in-out infinite;
}

.ai-toggle-btn:hover {
    transform: translateY(-1px) scale(1.01);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28), 0 0 16px rgba(184, 155, 94, 0.18);
    filter: saturate(1.02);
}

.ai-toggle-btn:focus-visible {
    outline: none;
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.28), 0 12px 28px rgba(0, 0, 0, 0.28);
}

.ai-toggle-btn::before {
    content: '';
    position: absolute;
    inset: -18%;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.26) 22%, rgba(255, 255, 255, 0) 45%);
    animation: aiOrbit 14s linear infinite;
    opacity: 0.11;
    z-index: 0;
}

.ai-toggle-btn svg {
    width: 24px;
    height: 24px;
    z-index: 2;
}

.ai-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    z-index: 1;
    filter: blur(10px);
    opacity: 0.16;
    animation: pulse 6.2s infinite;
}

.ai-toggle-btn.ai-quiet {
    background: rgba(10, 22, 40, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation-duration: 10s;
}

.ai-toggle-btn.ai-quiet::before {
    opacity: 0.08;
}

.ai-toggle-btn.ai-quiet .ai-glow {
    opacity: 0.1;
    filter: blur(18px);
}

@keyframes aiBreath {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.008);
    }
}

body.ai-chat-open .back-to-top-btn,
body.ai-chat-open .ai-toggle-btn {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(14px) scale(0.95) !important;
}

body.ai-chat-open {
    overflow: hidden;
    scrollbar-gutter: stable;
}

body.ai-chat-open .ai-concierge {
    transform: none !important;
}

@keyframes aiOrbit {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-toggle-btn,
    .ai-toggle-btn::before,
    .ai-glow {
        animation: none !important;
    }

    .ai-toggle-btn {
        transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    }
}

.ai-chat-window {
    position: absolute;
    z-index: 1100;
    bottom: 84px;
    right: 0;
    width: min(430px, calc(100vw - 30px));
    max-width: calc(100vw - 16px - env(safe-area-inset-left) - env(safe-area-inset-right));
    height: min(620px, calc(100dvh - 120px));
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    box-sizing: border-box;
    background: linear-gradient(180deg, rgba(10, 22, 40, 0.98) 0%, rgba(8, 18, 34, 0.98) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 22px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 28px 58px rgba(0, 0, 0, 0.56), 0 6px 18px rgba(0, 0, 0, 0.28);
    transform-origin: bottom right;
    transform: scale(0.94) translateY(8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.34s cubic-bezier(0.2, 0.7, 0.22, 1), opacity 0.28s ease;
    color: white;
    overflow: hidden;
    overscroll-behavior: contain;
}

.ai-chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

.ai-chat-window.is-date-picker-open .ai-messages,
.ai-chat-window.is-date-picker-open .ai-footer-meta,
.ai-chat-window.is-date-picker-open .ai-input,
.ai-chat-window.is-confirm-open .ai-messages,
.ai-chat-window.is-confirm-open .ai-footer-meta,
.ai-chat-window.is-confirm-open .ai-input {
    filter: blur(1.5px);
    pointer-events: none;
    user-select: none;
}

.ai-header {
    padding: 1.2rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01));
}

.ai-header::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: -1px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(184, 155, 94, 0.22), rgba(212, 175, 55, 0.95), rgba(184, 155, 94, 0.22));
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0;
    pointer-events: none;
}

.ai-chat-window.is-refreshing .ai-header::after {
    opacity: 1;
    animation: aiRefreshBar 1s ease-in-out infinite;
}

.ai-header-copy {
    min-width: 0;
    flex: 1;
    padding-right: 3.25rem;
}

.ai-avatar {
    width: 42px;
    height: 42px;
    background: var(--gold);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 0.82rem;
    box-shadow: 0 8px 20px rgba(200, 164, 106, 0.32);
}

.ai-header h4 {
    font-size: 1.03rem;
    margin-bottom: 0.15rem;
    color: white;
    line-height: 1.25;
}

.ai-header p {
    font-size: 0.72rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1.2;
}

.ai-footer-meta {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.04));
    padding: 0.55rem 1rem 0.5rem;
    min-height: 0;
}

.ai-context-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-height: 1.2rem;
    max-height: 3.8rem;
    overflow-y: auto;
    padding-right: 0.12rem;
}

.ai-context-bar::-webkit-scrollbar {
    width: 3px;
}

.ai-context-bar::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 999px;
}

.ai-context-bar[hidden] {
    display: none;
}

.ai-context-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.22rem 0.58rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(184, 155, 94, 0.35);
    color: rgba(255, 244, 222, 0.93);
    font-size: 0.65rem;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

.ai-header .close-btn,
.ai-fresh-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-header .close-btn {
    position: absolute;
    top: 0.98rem;
    right: 1rem;
    font-size: 1.08rem;
}

.ai-fresh-btn {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    font-size: 0.92rem;
}

.ai-fresh-btn i {
    display: block;
    line-height: 1;
    font-size: 0.92rem;
}

.ai-header .close-btn:hover,
.ai-fresh-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(5, 10, 20, 0.22);
}

.ai-header .close-btn:hover {
    border-color: rgba(255, 107, 107, 0.6);
    background: rgba(255, 107, 107, 0.14);
    color: #fff;
}

.ai-fresh-btn:hover {
    border-color: rgba(212, 175, 55, 0.58);
    background: rgba(212, 175, 55, 0.12);
    color: #fff;
}

.ai-header .close-btn:focus-visible,
.ai-fresh-btn:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.85);
    outline-offset: 2px;
}

.ai-fresh-btn.is-loading,
.ai-fresh-btn:disabled {
    cursor: progress;
    border-color: rgba(212, 175, 55, 0.52);
    background: rgba(212, 175, 55, 0.18);
    color: rgba(255, 255, 255, 0.96);
    transform: none;
}

.ai-fresh-btn.is-loading i {
    animation: aiSpin 0.75s linear infinite;
}

.ai-refresh-state {
    align-self: center;
    width: min(88%, 260px);
    margin: auto 0;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1rem 0.9rem;
    color: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 24px rgba(6, 12, 24, 0.24);
}

.ai-refresh-spinner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: rgba(255, 255, 255, 0.98);
    animation: aiSpin 0.75s linear infinite;
}

.ai-refresh-label {
    font-size: 0.79rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 249, 236, 0.88);
}

.ai-date-picker-overlay,
.ai-confirm-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-x: hidden;
    background: rgba(2, 7, 16, 0.56);
    backdrop-filter: blur(3px);
}

.ai-date-picker-modal,
.ai-confirm-modal {
    width: min(100%, 320px);
    max-width: 100%;
    inline-size: min(100%, 320px);
    max-inline-size: 100%;
    min-inline-size: 0;
    box-sizing: border-box;
    display: grid;
    gap: 0.12rem;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(14, 28, 48, 0.98), rgba(8, 18, 32, 0.98));
    padding: 1rem 0.95rem 0.9rem;
    box-shadow: 0 18px 35px rgba(1, 8, 20, 0.48);
    color: rgba(255, 255, 255, 0.94);
}

.ai-confirm-modal {
    text-align: center;
    gap: 0.28rem;
}

.ai-date-picker-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
}

.ai-date-picker-copy {
    margin: 0.38rem 0 0.8rem;
    font-size: 0.75rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.8);
}

.ai-confirm-badge {
    width: 42px;
    height: 42px;
    margin: 0 auto 0.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(223, 190, 101, 0.34);
    background: linear-gradient(135deg, rgba(223, 190, 101, 0.16), rgba(184, 155, 94, 0.08));
    color: #f6df97;
    box-shadow: 0 8px 18px rgba(1, 8, 20, 0.22);
}

.ai-confirm-badge i {
    font-size: 1rem;
}

.ai-confirm-eyebrow {
    margin: 0;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.92);
}

.ai-confirm-title {
    margin: 0.05rem 0 0;
    font-size: 0.96rem;
    font-weight: 700;
    color: #fff;
}

.ai-confirm-copy {
    margin: 0.18rem 0 0.82rem;
    font-size: 0.74rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
}

.ai-confirm-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 0.5rem;
}

.ai-confirm-actions .ai-date-picker-btn {
    flex: 1 1 0;
    min-width: 0;
}

.ai-date-picker-label {
    display: block;
    margin-bottom: 0.34rem;
    font-size: 0.69rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.9);
}

.ai-date-picker-field {
    position: relative;
    display: block;
    inline-size: 100%;
    width: 100%;
    max-inline-size: 100%;
    max-width: 100%;
    min-inline-size: 0;
    min-width: 0;
}

.ai-date-picker-field::after {
    content: '🗓';
    position: absolute;
    top: 50%;
    right: 0.72rem;
    transform: translateY(-50%);
    font-size: 0.95rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

.ai-date-picker-input {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    position: relative;
    inline-size: 100%;
    width: 100%;
    max-width: 100%;
    max-inline-size: 100%;
    min-width: 0;
    min-inline-size: 0;
    block-size: auto;
    min-block-size: 44px;
    flex: 0 1 auto;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 0.56rem 2.3rem 0.56rem 0.6rem;
    font-size: 0.87rem;
    line-height: 1.25;
    outline: none;
    margin-bottom: 0.82rem;
}

.ai-date-picker-input::-webkit-datetime-edit,
.ai-date-picker-input::-webkit-datetime-edit-fields-wrapper,
.ai-date-picker-input::-webkit-date-and-time-value {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-date-picker-input::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ai-date-picker-input:focus {
    border-color: rgba(212, 175, 55, 0.82);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.ai-date-picker-helper {
    margin: -0.5rem 0 0.62rem;
    font-size: 0.68rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
}

.ai-date-picker-hint {
    margin: -0.1rem 0 0.72rem;
    font-size: 0.68rem;
    line-height: 1.45;
    color: rgba(255, 201, 126, 0.95);
    background: rgba(255, 167, 89, 0.12);
    border: 1px solid rgba(255, 167, 89, 0.28);
    border-radius: 8px;
    padding: 0.4rem 0.52rem;
}

.ai-date-picker-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.ai-date-picker-btn {
    appearance: none;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.92);
    padding: 0.42rem 0.8rem;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.ai-date-picker-btn:hover {
    transform: translateY(-1px);
}

.ai-date-picker-btn.is-secondary:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

.ai-date-picker-btn.is-primary {
    border-color: rgba(223, 190, 101, 0.64);
    background: linear-gradient(135deg, rgba(223, 190, 101, 0.32), rgba(184, 155, 94, 0.24));
    color: #fffaf1;
    font-weight: 600;
}

.ai-date-picker-btn.is-primary:hover {
    border-color: rgba(223, 190, 101, 0.9);
    background: linear-gradient(135deg, rgba(223, 190, 101, 0.44), rgba(184, 155, 94, 0.32));
}

@keyframes aiSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes aiRefreshBar {
    0% {
        transform: scaleX(0.12);
    }

    50% {
        transform: scaleX(0.95);
    }

    100% {
        transform: scaleX(0.2);
    }
}

.ai-messages {
    flex: 1;
    padding: 1.1rem 1.2rem 1.25rem;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.ai-messages::-webkit-scrollbar {
    width: 4px;
}

.ai-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.message {
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    font-size: 0.89rem;
    max-width: min(92%, 32rem);
    line-height: 1.54;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
    text-wrap: pretty;
}

.ai-message {
    background: rgba(255, 255, 255, 0.095);
    align-self: flex-start;
    border-top-left-radius: 6px;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.08);
    max-width: min(100%, 32rem);
}

.ai-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.7rem;
    max-height: 9.75rem;
    opacity: 1;
    overflow-x: hidden;
    overflow-y: auto;
    transform-origin: top center;
    transition: max-height 0.35s ease, opacity 0.28s ease, margin-top 0.28s ease, transform 0.28s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.34) transparent;
    padding-right: 0.2rem;
}

.ai-quick-replies::-webkit-scrollbar {
    width: 4px;
}

.ai-quick-replies::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
}

.ai-quick-replies.is-settling {
    opacity: 0.62;
    transform: translateY(-2px) scale(0.985);
}

.ai-quick-replies.is-collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    transform: translateY(-6px) scale(0.96);
    pointer-events: none;
}

.ai-quick-reply {
    appearance: none;
    border: 1px solid rgba(184, 155, 94, 0.35);
    background: rgba(184, 155, 94, 0.16);
    color: rgba(255, 248, 235, 0.94);
    border-radius: 999px;
    padding: 0.34rem 0.74rem;
    font-size: 0.71rem;
    line-height: 1.2;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ai-quick-reply:hover {
    background: rgba(212, 175, 55, 0.24);
    border-color: rgba(212, 175, 55, 0.48);
    transform: translateY(-1px);
}

.ai-quick-reply:focus-visible {
    outline: 2px solid rgba(212, 175, 55, 0.75);
    outline-offset: 2px;
}

.ai-quick-reply.is-selected {
    background: rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.62);
    color: rgba(255, 250, 240, 0.98);
}

.ai-quick-reply.is-disabled,
.ai-quick-reply:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    transform: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.7);
}

.ai-message-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.8rem;
    max-height: 9.75rem;
    opacity: 1;
    overflow-x: hidden;
    overflow-y: auto;
    transform-origin: top center;
    transition: max-height 0.35s ease, opacity 0.28s ease, margin-top 0.28s ease, transform 0.28s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.34) transparent;
    padding-right: 0.2rem;
}

.ai-message-actions::-webkit-scrollbar {
    width: 4px;
}

.ai-message-actions::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 4px;
}

.ai-message-actions.is-settling {
    opacity: 0.64;
    transform: translateY(-2px) scale(0.985);
}

.ai-message-actions.is-collapsed {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    transform: translateY(-6px) scale(0.96);
    pointer-events: none;
}

.ai-message-action {
    appearance: none;
    border: 1px solid rgba(212, 175, 55, 0.42);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.24), rgba(184, 155, 94, 0.18));
    color: rgba(255, 249, 238, 0.98);
    border-radius: 999px;
    padding: 0.48rem 0.92rem;
    font-size: 0.73rem;
    line-height: 1.2;
    letter-spacing: 0.03em;
    font-weight: 600;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ai-message-action:hover {
    transform: translateY(-1px);
    border-color: rgba(223, 190, 101, 0.72);
    background: linear-gradient(135deg, rgba(223, 190, 101, 0.34), rgba(184, 155, 94, 0.24));
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
}

.ai-message-action:focus-visible {
    outline: 2px solid rgba(223, 190, 101, 0.88);
    outline-offset: 2px;
}

.ai-message-action.is-selected {
    background: linear-gradient(135deg, rgba(223, 190, 101, 0.42), rgba(184, 155, 94, 0.28));
    border-color: rgba(223, 190, 101, 0.88);
    color: #fffaf0;
}

.ai-message-action.is-disabled,
.ai-message-action:disabled {
    cursor: not-allowed;
    opacity: 0.68;
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.74);
}

.user-message {
    background: var(--gold);
    color: white;
    align-self: flex-end;
    border-top-right-radius: 6px;
    box-shadow: 0 4px 12px rgba(184, 155, 94, 0.2);
}

.ai-input {
    padding: 0.92rem 1rem 1.02rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: 0.56rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.01), rgba(255, 255, 255, 0.03));
}

.ai-input-field {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.ai-input input {
    width: 100%;
    background: rgba(255, 255, 255, 0.095);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.78rem 3.25rem 0.78rem 1rem;
    color: white;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 0.9rem;
}

.ai-input input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.ai-input input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.ai-send-btn {
    position: absolute;
    top: 50%;
    right: 0.42rem;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    border: none;
    color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transform: translateY(-50%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ai-send-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 8px 16px rgba(184, 155, 94, 0.24);
}

.ai-send-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: translateY(-50%);
    box-shadow: none;
}

.ai-send-btn svg {
    width: 17px;
    height: 17px;
}

@media (max-width: 600px) {
    body.ai-chat-open {
        overflow: hidden;
    }

    .ai-quick-reply {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }

    .ai-chat-window {
        position: fixed;
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        top: max(8px, env(safe-area-inset-top));
        bottom: calc(72px + env(safe-area-inset-bottom));
        width: auto;
        max-width: none;
        height: auto;
        max-height: none;
        transform-origin: bottom center;
    }

    .ai-header {
        padding: 1rem 0.95rem 0.92rem;
        gap: 0.72rem;
        min-height: 4.4rem;
    }

    .ai-header-copy {
        min-width: 0;
        padding-right: 3.15rem;
    }

    .ai-header h4,
    .ai-header p,
    .ai-header small {
        white-space: normal !important;
        overflow-wrap: anywhere;
    }

    .ai-header h4 {
        font-size: 0.98rem;
    }

    .ai-header .close-btn {
        top: 0.88rem;
        right: 0.9rem;
        width: 36px;
        height: 36px;
        font-size: 1.12rem;
    }

    .ai-refresh-state {
        width: min(92%, 240px);
        padding: 0.88rem 0.78rem;
    }

    .ai-refresh-label {
        font-size: 0.73rem;
    }

    .ai-input input,
    .ai-date-picker-input {
        font-size: 16px;
    }

    .ai-date-picker-overlay,
    .ai-confirm-overlay {
        align-items: flex-end;
        justify-content: stretch;
        padding: 0.72rem 0.72rem calc(0.9rem + env(safe-area-inset-bottom));
        overflow-x: hidden;
    }

    .ai-date-picker-modal,
    .ai-confirm-modal {
        width: 100%;
        max-width: 100%;
        inline-size: 100%;
        max-inline-size: 100%;
        min-inline-size: 0;
        align-self: stretch;
        box-sizing: border-box;
        border-radius: 16px;
        padding: 0.88rem 0.8rem 0.8rem;
    }

    .ai-date-picker-title {
        font-size: 0.86rem;
    }

    .ai-date-picker-copy {
        font-size: 0.72rem;
        margin-bottom: 0.72rem;
    }

    .ai-confirm-copy {
        font-size: 0.72rem;
        margin-bottom: 0.72rem;
    }

    .ai-date-picker-actions,
    .ai-confirm-actions {
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .ai-date-picker-btn {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .ai-confirm-actions .ai-date-picker-btn {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .ai-footer-meta {
        padding: 0.5rem 0.85rem 0.45rem;
    }

    .ai-context-bar {
        min-height: 0;
        max-height: 3.4rem;
    }

    .ai-messages {
        padding: 0.95rem 0.95rem 1.05rem;
        gap: 0.72rem;
    }

    .message {
        max-width: 92%;
        font-size: 0.86rem;
        padding: 0.78rem 0.86rem;
    }

    .ai-input {
        padding: 0.8rem 0.85rem 0.9rem;
    }

    .ai-input input {
        padding: 0.7rem 3rem 0.7rem 0.88rem;
        font-size: 0.86rem;
    }

    .ai-input .ai-fresh-btn {
        width: 40px;
        height: 40px;
    }

    .ai-send-btn {
        width: 32px;
        height: 32px;
        right: 0.38rem;
    }
}

@media (max-width: 576px) {
    .ai-concierge {
        bottom: max(16px, env(safe-area-inset-bottom));
        right: max(16px, env(safe-area-inset-right));
    }

    .back-to-top-btn {
        bottom: 20px;
        right: 26px;
        width: 40px;
        height: 40px;
    }

    .ai-chat-window {
        left: max(10px, env(safe-area-inset-left));
        right: max(10px, env(safe-area-inset-right));
        top: max(8px, env(safe-area-inset-top));
        bottom: calc(68px + env(safe-area-inset-bottom));
        width: auto;
        height: auto;
    }

    .ai-header {
        padding: 1rem 0.9rem 0.9rem;
    }

    .ai-header-copy {
        padding-right: 3.15rem;
    }

    .ai-header .close-btn {
        right: 0.82rem;
    }

    .ai-context-chip {
        font-size: 0.62rem;
        padding: 0.16rem 0.48rem;
    }
}
