/* *
 * SpinCycles AI Assistant Chat Modal Styles
 * Dedicated Stylesheet for #aiChatModal
 */

:root {
    --ai-primary: #6e3667;
    --ai-primary-alt: #6F3667;
    --ai-primary-dark: #55274F;
    --ai-primary-darker: #3b1836;
    --ai-accent: #7CB342;
    --ai-accent-dark: #2E580A;
    --ai-border: #E5E0E4;
    --ai-danger: #D32F2F;
    --ai-font: 'Quicksand', Arial, sans-serif;
    --ai-radius-panel: 20px;
    --ai-radius-pill: 999px;
}

/* =========================================================
   SVG Neon Cyclone Animation
========================================================= */
.cyclone-sys {
    transform-origin: 200px 350px;
    animation: rise 2.5s cubic-bezier(0.2, 0, 0.3, 1) infinite;
}

.cyclone-sys:nth-child(3) {
    animation-delay: -1.25s;
}

@keyframes rise {
    0% {
        transform: translateY(120px) scale(0.1);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateY(-90px) scale(1.4);
        opacity: 0;
    }
}

.ring {
    fill: none;
    stroke-linecap: round;
    animation: spin linear infinite;
    filter: url(#glow);
}

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

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

.r-cw {
    animation-direction: normal;
}

.r-ccw {
    animation-direction: reverse;
}

.c-green {
    stroke: #00FFA3;
}

.c-purple {
    stroke: #B026FF;
}

/* =========================================================
   Root & Overlay Modes
========================================================= */
.ai-chat-modal-root {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2147483647;
    display: none;
    font-family: var(--ai-font);
}

.ai-chat-modal-root.centered {
    inset: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-chat-modal-root.centered.opaque {
    background: rgba(0, 0, 0, 0.85);
}

.ai-chat-modal-root.fullpage {
    inset: 0 !important;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
}

.ai-chat-modal-root.fullpage .ai-chat-panel {
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
}

.ai-chat-modal-root.fullpage .chat-header {
    border-radius: 0 !important;
}

.ai-chat-modal-root.fullpage .ai-history-panel {
    max-width: 340px;
}

/* =========================================================
   Modal Entrance & Exit Animations
========================================================= */
@media (min-width: 1025px) {
    #aiChatModal.ai-modal-open .ai-chat-panel {
        animation: aiModalPopIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
        transform-origin: bottom right;
    }

    #aiChatModal.ai-modal-closing .ai-chat-panel {
        animation: aiModalPopOut 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
        transform-origin: bottom right;
    }
}

@media (max-width: 1024px) {
    #aiChatModal.ai-modal-open {
        animation: aiModalMobileSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) both !important;
    }

    #aiChatModal.ai-modal-closing {
        animation: aiModalMobileSlideDown 0.2s cubic-bezier(0.4, 0, 1, 1) forwards !important;
    }

    .ai-modal-cyclone-loader {
        border-radius: 0 !important;
    }
}

@keyframes aiModalPopIn {
    0% {
        opacity: 0;
        transform: scale(0.85) translateY(24px);
    }

    68% {
        opacity: 1;
        transform: scale(1.015) translateY(-2px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes aiModalPopOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    100% {
        opacity: 0;
        transform: scale(0.88) translateY(20px);
    }
}

@keyframes aiModalMobileSlideUp {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes aiModalMobileSlideDown {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(100%);
    }
}

/* =========================================================
   Opening Neon Cyclone Loader Overlay
========================================================= */
.ai-modal-cyclone-loader {
    position: absolute;
    inset: 0;
    z-index: 1000;
    background: radial-gradient(circle at center, #230c2b 0%, #110515 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--ai-radius-panel);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.ai-modal-cyclone-loader.active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.ai-modal-cyclone-loader.fade-out {
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
}

.ai-cyclone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.ai-cyclone-svg-box {
    width: 175px;
    height: 175px;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 0 22px rgba(176, 38, 255, 0.45));
}

.ai-cyclone-brand,
.ai-cyclone-tagline {
    font-family: var(--ai-font);
    margin-top: 6px;
}

.ai-cyclone-brand {
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 0 14px rgba(176, 38, 255, 0.7);
}

.ai-cyclone-tagline {
    font-size: 13px;
    font-weight: 600;
    color: #00FFA3;
    letter-spacing: 0.3px;
    text-shadow: 0 0 8px rgba(0, 255, 163, 0.5);
}

/* =========================================================
   Main Chat Panel
========================================================= */
.ai-chat-panel {
    height: min(600px, calc(100vh - 32px));
    width: calc(min(600px, calc(100vh - 32px)) * 11 / 16);
    aspect-ratio: 11 / 16;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    flex-shrink: 0;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: var(--ai-radius-panel);
    box-shadow: 0 10px 30px rgba(111, 54, 103, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--ai-border);
    font-family: var(--ai-font);
    position: relative;
}

/* =========================================================
   Header & Action Buttons
========================================================= */
.ai-chat-panel .chat-header {
    padding: 8px 14px;
    background: var(--ai-primary) !important;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    user-select: none;
    border-radius: var(--ai-radius-panel) var(--ai-radius-panel) 0 0;
    flex-shrink: 0;
    box-sizing: border-box;
    min-height: 58px;
    width: 100%;
}

.ai-chat-panel .chat-header .chat-header-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.ai-chat-panel .chat-header img,
.ai-chat-panel .chat-header .chat-header-logo {
    height: 48px;
    max-height: 50px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    object-position: left center;
    display: block;
    flex-shrink: 1;
}

.ai-chat-panel .chat-header .chat-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ai-chat-panel .chat-header .ai-chat-history,
.ai-chat-panel .chat-header .ai-chat-new,
.ai-chat-panel .chat-header .ai-chat-maximize,
.ai-chat-panel .chat-header .ai-chat-close {
    background: rgba(255, 255, 255, 0.16);
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    flex-shrink: 0;
    box-sizing: border-box;
    transition: background 0.18s ease, transform 0.15s ease, opacity 0.15s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.ai-chat-panel .chat-header .ai-chat-history:hover,
.ai-chat-panel .chat-header .ai-chat-new:hover,
.ai-chat-panel .chat-header .ai-chat-maximize:hover,
.ai-chat-panel .chat-header .ai-chat-close:hover {
    background: rgba(255, 255, 255, 0.28);
}

.ai-chat-panel .chat-header .ai-chat-history:active,
.ai-chat-panel .chat-header .ai-chat-new:active,
.ai-chat-panel .chat-header .ai-chat-maximize:active,
.ai-chat-panel .chat-header .ai-chat-close:active {
    background: rgba(255, 255, 255, 0.38);
    transform: scale(0.94);
}

.ai-chat-panel .chat-header .ai-chat-history:disabled,
.ai-chat-panel .chat-header .ai-chat-new:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.ai-chat-panel .chat-header svg {
    display: block;
    pointer-events: none;
}

/* =========================================================
   Messages Area & Bubbles
========================================================= */
.ai-chat-panel .messages {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background:
        radial-gradient(circle at top left, rgba(124, 179, 66, 0.06), transparent 40%),
        radial-gradient(circle at bottom right, rgba(111, 54, 103, 0.05), transparent 40%);
}

.ai-chat-panel .message {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
    animation: aiMsgIn 0.25s ease-out;
}

@keyframes aiMsgIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.ai-chat-panel .message.user {
    align-items: flex-end;
}

.ai-chat-panel .message.ai {
    align-items: flex-start;
}

.ai-chat-panel .message-content {
    box-sizing: border-box;
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    white-space: pre-wrap;
    font-size: 14.5px;
    font-weight: 500;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ai-chat-panel .message.user .message-content {
    background: var(--ai-accent);
    color: #16310a;
    border-bottom-right-radius: 4px;
    box-shadow: 0 3px 10px rgba(124, 179, 66, 0.30);
}

.ai-chat-panel .message.ai .message-content {
    background: #F5EEF4;
    color: var(--ai-primary-dark);
    border: 1px solid var(--ai-border);
    border-bottom-left-radius: 4px;
    position: relative;
    padding-right: 34px;
}

.ai-chat-panel .message-content mark,
.ai-chat-panel .message-content .ai-highlight {
    background: rgba(124, 179, 66, 0.25);
    color: #2e5b0e;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.ai-chat-panel .message-content .ai-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    margin: 2px;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

.ai-chat-panel .message-content .ai-badge-id {
    background: #e8e0e7;
    color: var(--ai-primary-dark);
    border: 1px solid #c9b3c7;
    font-family: monospace;
    font-size: 12.5px;
}

.ai-chat-panel .message-content .ai-badge-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.ai-chat-panel .message-content .ai-badge-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

.ai-chat-panel .message-content .ai-badge-danger {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.ai-chat-panel .message-content .ai-badge-currency {
    background: #fff8e1;
    color: #f57f17;
    border: 1px solid #ffe082;
    font-weight: 700;
}

.ai-chat-panel .message-content strong {
    color: var(--ai-primary-darker);
    font-weight: 700;
}

.ai-chat-panel .message-content a,
.ai-chat-panel .message-content .ai-chat-link-btn {
    display: inline !important;
    color: #1A73E8 !important;
    font-weight: 600 !important;
    text-decoration: underline !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    word-break: break-word !important;
    transition: color 0.15s ease !important;
    cursor: pointer !important;
}

.ai-chat-panel .message-content a:hover,
.ai-chat-panel .message-content .ai-chat-link-btn:hover {
    color: #1557B0 !important;
    text-decoration: underline !important;
    background: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.ai-chat-panel .message-time {
    font-size: 11px;
    font-weight: 600;
    color: #9C8FA0;
    margin-top: 4px;
    padding: 0 4px;
}

/* =========================================================
   Image Attachment Preview & Msg Image
========================================================= */
.ai-image-preview-area {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #f9f4f8;
    border-top: 1px solid var(--ai-border);
}

.ai-preview-thumb-wrap {
    position: relative;
    width: 46px;
    height: 46px;
}

.ai-preview-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--ai-primary-alt);
}

.ai-remove-img-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #c62828;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-preview-label {
    font-size: 12px;
    color: var(--ai-primary-alt);
    font-weight: 600;
}

.ai-msg-img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 12px;
    margin-bottom: 6px;
    display: block;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* =========================================================
   AI Message Menu & Dropdown
========================================================= */
.ai-msg-menu-wrap {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 10;
}

.ai-msg-more-btn {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(111, 54, 103, 0.12);
    color: #7D697E;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    outline: none;
    box-shadow: 0 2px 6px rgba(85, 39, 79, 0.05);
}

.ai-msg-more-btn:hover {
    background: var(--ai-primary-dark);
    color: #ffffff;
    border-color: var(--ai-primary-dark);
    transform: scale(1.08) rotate(90deg);
    box-shadow: 0 4px 12px rgba(85, 39, 79, 0.25);
}

.ai-msg-dropdown {
    display: none;
    position: absolute;
    top: 32px;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(111, 54, 103, 0.14);
    border-radius: 14px;
    box-shadow: 0 12px 32px -4px rgba(85, 39, 79, 0.22), 0 4px 12px -2px rgba(0, 0, 0, 0.05);
    padding: 6px;
    min-width: 185px;
    z-index: 50;
    transform-origin: top right;
    animation: aiDropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-msg-dropdown.show {
    display: block;
}

@keyframes aiDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.92);
    }

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

.ai-report-menu-item {
    width: 100%;
    background: transparent;
    border: none;
    color: #4A3B4C;
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: all 0.18s ease;
    font-family: inherit;
}

.ai-report-menu-item:hover:not(:disabled) {
    background: linear-gradient(135deg, #FAF5FA 0%, #F3EAF2 100%);
    color: var(--ai-primary-dark);
    transform: translateX(2px);
}

.ai-report-menu-item.ai-menu-item-copy:hover:not(:disabled) {
    background: linear-gradient(135deg, #F5EEF4 0%, #EDE4EC 100%);
    color: var(--ai-primary-dark);
}

.ai-report-menu-item.ai-menu-item-report:hover:not(:disabled) {
    background: linear-gradient(135deg, #FFF0F0 0%, #FDE2E2 100%);
    color: var(--ai-danger);
}

.ai-report-menu-item .ai-report-icon {
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(111, 54, 103, 0.07);
    transition: transform 0.18s ease;
}

.ai-report-menu-item:hover:not(:disabled) .ai-report-icon {
    transform: scale(1.15);
}

.ai-report-menu-item:disabled {
    color: #5D932B;
    cursor: default;
    background: #F2F9EC;
    font-weight: 700;
}

/* =========================================================
   In-Chat Report Card
========================================================= */
.ai-report-card {
    background: #ffffff;
    border: 1.5px solid #E5DCE4;
    border-radius: 14px;
    padding: 14px;
    margin-top: 10px;
    box-shadow: 0 8px 24px rgba(111, 54, 103, 0.14);
    font-size: 13px;
    animation: aiMsgIn 0.2s ease-out;
    width: 100%;
    max-width: 330px;
}

.ai-report-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    color: var(--ai-primary-dark);
    margin-bottom: 10px;
    font-size: 13px;
    border-bottom: 1px dashed #E5DCE4;
    padding-bottom: 6px;
}

.ai-report-close-btn {
    background: #F4EFF4;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #8C7B8D;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.ai-report-close-btn:hover {
    background: #E8DCE7;
    color: var(--ai-primary-dark);
}

.ai-report-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ai-primary-alt);
    margin: 8px 0 4px;
}

.ai-report-select,
.ai-report-textarea {
    width: 100%;
    padding: 7px 11px;
    border: 1px solid var(--ai-border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 12px;
    box-sizing: border-box;
    outline: none;
    background: #FCFAFC;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ai-report-select:focus,
.ai-report-textarea:focus {
    border-color: var(--ai-primary-alt);
    box-shadow: 0 0 0 3px rgba(111, 54, 103, 0.1);
}

.ai-report-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.ai-report-submit-btn {
    background: var(--ai-danger);
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px rgba(211, 47, 47, 0.25);
}

.ai-report-submit-btn:hover:not(:disabled) {
    background: #B71C1C;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.35);
}

.ai-report-cancel-btn {
    background: #F4EFF4;
    color: var(--ai-primary-dark);
    border: 1px solid #E4D9E3;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ai-report-cancel-btn:hover {
    background: #E8DCE7;
}

/* =========================================================
   Suggestions Chips
========================================================= */
.ai-chat-panel .suggestions {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding: 4px 18px 10px;
    flex-shrink: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.ai-chat-panel .suggestions::-webkit-scrollbar {
    display: none;
}

.ai-chat-panel .suggestion-chip {
    border: 1.5px solid var(--ai-accent);
    background: #EAF7E0;
    color: var(--ai-accent-dark);
    font-family: inherit;
    font-weight: 600;
    font-size: 12.5px;
    padding: 8px 14px;
    border-radius: var(--ai-radius-pill);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.ai-chat-panel .suggestion-chip:hover:not(:disabled) {
    background: var(--ai-accent);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(124, 179, 66, 0.3);
}

.ai-chat-panel .suggestion-chip:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================================
   Typing Indicator
========================================================= */
.ai-chat-panel .typing {
    display: none;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 0 22px 12px;
    padding: 6px 16px 6px 8px;
    background: #ffffff;
    border: 1px solid var(--ai-border);
    border-radius: var(--ai-radius-pill);
    box-shadow: 0 4px 14px rgba(111, 54, 103, 0.10);
    color: var(--ai-primary-dark);
    font-size: 12.5px;
    font-weight: 600;
}

/* =========================================================
   Input Area & Controls
========================================================= */
.ai-chat-panel .chat-input-area {
    position: relative;
    border-top: 1px solid #ECE7EB;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    background: #ffffff;
}

.ai-chat-panel .ai-input-pill-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid #E2E8F0;
    border-radius: var(--ai-radius-pill);
    padding: 4px 6px 4px 18px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    min-height: 48px;
    box-sizing: border-box;
}

.ai-chat-panel .ai-input-pill-wrapper:focus-within {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.ai-chat-panel .chat-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 15px;
    color: #1E293B;
    padding: 8px 0 !important;
    font-family: inherit;
    min-width: 0;
    box-shadow: none !important;
}

.ai-chat-panel .chat-input::placeholder {
    color: #94A3B8;
    font-weight: 400;
}

.ai-chat-panel .chat-input:disabled {
    background: transparent !important;
    color: #94A3B8 !important;
    cursor: not-allowed;
}

.ai-chat-panel .ai-input-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: 6px;
    flex-shrink: 0;
}

.ai-chat-panel .ai-action-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #334155;
    transition: all 0.15s ease;
    padding: 0;
    outline: none;
    box-sizing: border-box;
    flex-shrink: 0;
}

.ai-chat-panel .ai-action-btn:hover:not(:disabled) {
    background: #F1F5F9;
    color: #0F172A;
    transform: scale(1.08);
}

.ai-chat-panel .ai-action-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.ai-chat-panel .ai-action-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.ai-chat-panel .ai-attach-btn,
.ai-chat-panel .ai-emoji-btn {
    color: #334155;
}

.ai-chat-panel .ai-emoji-btn.active {
    background: #E2E8F0;
    color: #0F172A;
}

.ai-chat-panel .send-button {
    width: 0;
    min-width: 0;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10B981;
    cursor: pointer;
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0;
    outline: none;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.6);
    pointer-events: none;
    overflow: hidden;
}

.ai-chat-panel .send-button.visible {
    width: 36px;
    min-width: 36px;
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
    overflow: visible;
}

.ai-chat-panel .send-button:hover:not(:disabled) {
    background: #ECFDF5;
    color: #059669;
    transform: scale(1.12);
}

.ai-chat-panel .send-button:disabled {
    opacity: 0.3;
    color: #94A3B8;
    cursor: not-allowed;
    transform: none;
}

/* =========================================================
   Emoji Picker Popover
========================================================= */
.ai-emoji-picker-container {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 14px;
    width: 320px;
    max-width: calc(100vw - 28px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 36px -4px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.08);
    z-index: 99999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: aiEmojiPop 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aiEmojiPop {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(8px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ai-emoji-search-box {
    position: relative;
    margin: 14px 14px 6px;
    border: 1.5px solid #2563EB;
    border-radius: 12px;
    padding: 4px 10px;
    background: #ffffff;
}

.ai-emoji-search-label {
    position: absolute;
    top: -8px;
    left: 12px;
    background: #ffffff;
    padding: 0 5px;
    font-size: 11px;
    font-weight: 600;
    color: #2563EB;
    line-height: 1;
}

.ai-emoji-search-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13.5px;
    color: #1E293B;
    padding: 4px 0;
    font-family: inherit;
}

.ai-emoji-search-input::placeholder {
    color: #94A3B8;
}

.ai-emoji-category-title {
    font-size: 14px;
    font-weight: 700;
    color: #0F172A;
    padding: 8px 16px 4px;
    letter-spacing: -0.2px;
}

.ai-emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    padding: 6px 12px 12px;
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ai-emoji-grid::-webkit-scrollbar {
    width: 6px;
}

.ai-emoji-grid::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: var(--ai-radius-pill);
}

.ai-emoji-item {
    font-size: 22px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.1s;
    outline: none;
    padding: 0;
}

.ai-emoji-item:hover {
    background: #F1F5F9;
    transform: scale(1.22);
}

/* =========================================================
   Read-Only Banner
========================================================= */
.ai-chat-panel .ai-readonly-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: #FBF3E9;
    border-top: 1px solid #F0E0C8;
    font-size: 12.5px;
    font-weight: 600;
    color: #7A5A26;
}

.ai-chat-panel .ai-readonly-return {
    border: none;
    background: var(--ai-accent);
    color: #16310a;
    font-weight: 700;
    font-family: inherit;
    font-size: 12px;
    padding: 7px 12px;
    border-radius: var(--ai-radius-pill);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* =========================================================
   History Backdrop & Drawer Panel
========================================================= */
.ai-history-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 40;
}

.ai-history-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.ai-history-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 78%;
    max-width: 280px;
    background: #ffffff;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-history-panel.open {
    transform: translateX(0);
}

.ai-history-panel-header {
    padding: 14px 16px;
    background: var(--ai-primary) !important;
    color: #fff;
    font-weight: 700;
    font-size: 14.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.ai-history-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
}

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

.ai-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.ai-history-item {
    display: block;
    width: 100%;
    text-align: left;
    background: #F5EEF4;
    border: 1px solid var(--ai-border);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s ease;
}

.ai-history-item:hover {
    background: #EAE0E8;
}

.ai-history-item-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ai-primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-history-item-date {
    font-size: 11px;
    font-weight: 600;
    color: #9C8FA0;
    margin-top: 3px;
}

.ai-history-empty,
.ai-history-loading {
    text-align: center;
    color: #9C8FA0;
    font-size: 13px;
    font-weight: 600;
    padding: 20px 10px;
}

.ai-history-load-more {
    display: block;
    width: 100%;
    text-align: center;
    background: transparent;
    border: 1.5px dashed #C9BCC7;
    color: var(--ai-primary-alt);
    font-family: inherit;
    font-weight: 700;
    font-size: 12.5px;
    padding: 10px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.ai-history-load-more:hover:not(:disabled) {
    background: #F5EEF4;
}

.ai-history-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* =========================================================
   Desktop Resize Handle & Floating Scroll Pill
========================================================= */
.ai-resize-handle {
    position: absolute;
    width: 18px;
    height: 18px;
    right: 6px;
    bottom: 50px;
    cursor: se-resize;
    z-index: 3000;
}

.ai-resize-handle::after {
    content: '';
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 9px;
    height: 9px;
    border-right: 2px solid #c4b5be;
    border-bottom: 2px solid #c4b5be;
    opacity: 0.7;
    transition: opacity 0.15s ease, border-color 0.15s ease;
}

.ai-resize-handle:hover::after {
    opacity: 1;
    border-color: var(--ai-accent);
}

.ai-new-msg-pill {
    position: absolute;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ai-primary-alt);
    color: #ffffff;
    border: none;
    padding: 7px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(111, 54, 103, 0.35);
    z-index: 45;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    animation: aiMsgIn 0.2s ease-out;
}

.ai-new-msg-pill:hover {
    background: var(--ai-primary-dark);
    transform: translateX(-50%) translateY(-2px);
}

/* =========================================================
   Attachment Image Lightbox
========================================================= */
.ai-attachment-modal-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 2147483648;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: aiAttachmentFadeIn 0.2s ease-out;
}

@keyframes aiAttachmentFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.ai-attachment-modal-content {
    position: relative;
    width: 50vw;
    max-width: 90vw;
    max-height: 85vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 24px;
    box-sizing: border-box;
    animation: aiAttachmentZoomIn 0.2s ease-out;
}

@keyframes aiAttachmentZoomIn {
    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.ai-attachment-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease, transform 0.15s ease;
}

.ai-attachment-modal-close:hover {
    background: var(--ai-danger);
    transform: scale(1.1);
}

.ai-attachment-modal-body {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.ai-attachment-modal-body img {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

@media (max-width: 768px) {
    .ai-attachment-modal-content {
        width: 90vw;
    }
}

/* =========================================================
   Guest Pre-Chat Lead Form
========================================================= */
.ai-guest-form-container {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #FAF6FA;
    z-index: 10;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    animation: aiFormFadeIn 0.22s ease-out;
}

@keyframes aiFormFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

.ai-guest-form-card {
    background: #ffffff;
    border: 1px solid #E8DEE7;
    border-radius: 16px;
    padding: 18px 16px;
    box-shadow: 0 4px 18px rgba(111, 54, 103, 0.08);
    display: flex;
    flex-direction: column;
}

.ai-guest-form-intro {
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(111, 54, 103, 0.06), rgba(124, 179, 66, 0.08));
    padding: 11px 13px;
    border-radius: 12px;
    border-left: 3.5px solid var(--ai-primary-alt);
}

.ai-guest-form-text {
    font-size: 13.5px;
    color: #4A3146;
    line-height: 1.45;
    margin: 0;
    font-weight: 500;
}

.ai-form-group {
    margin-bottom: 13px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.ai-form-label {
    font-size: 12px;
    font-weight: 700;
    color: #4A3146;
    margin-bottom: 5px;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 2px;
}

.ai-form-label .req {
    color: var(--ai-danger);
    font-weight: 700;
}

.ai-form-input {
    width: 100%;
    padding: 10px 13px;
    font-size: 14px;
    font-family: inherit;
    color: #2D1B2B;
    background: #FFFFFF;
    border: 1.5px solid #E2D7E1;
    border-radius: 10px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ai-form-input:focus {
    border-color: var(--ai-primary-alt);
    box-shadow: 0 0 0 3px rgba(111, 54, 103, 0.12);
}

.ai-form-input.has-error {
    border-color: var(--ai-danger) !important;
    background: #FFF9F9;
}

.ai-form-error {
    font-size: 11px;
    color: var(--ai-danger);
    margin-top: 4px;
    font-weight: 600;
    display: none;
}

.ai-phone-input-wrap {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

.ai-phone-prefix {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    font-weight: 700;
    color: var(--ai-primary-alt);
    background: #F4ECF3;
    padding: 3px 6px;
    border-radius: 6px;
    pointer-events: none;
    z-index: 2;
}

.ai-phone-input {
    padding-left: 54px !important;
}

.ai-form-submit-btn {
    width: 100%;
    margin-top: 10px;
    padding: 13px 20px;
    min-height: 48px;
    background: linear-gradient(135deg, #562351, #481A43);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(78, 28, 73, 0.3);
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.ai-form-submit-btn:hover {
    background: linear-gradient(135deg, #4B1D46, #3C1238);
    box-shadow: 0 6px 20px rgba(78, 28, 73, 0.4);
    transform: translateY(-1px);
}

.ai-form-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(78, 28, 73, 0.3);
}

.ai-form-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ai-form-submit-btn svg {
    display: block;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.ai-form-submit-btn:hover:not(:disabled) svg {
    transform: translateX(2px);
}

.ai-guest-form-footer {
    margin-top: 18px;
    padding-top: 2px;
}

.ai-guest-help-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 0 0 14px;
    color: #9C8E9D;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.ai-guest-help-divider::before,
.ai-guest-help-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ECE4EB;
}

.ai-guest-help-divider span {
    padding: 0 10px;
    white-space: nowrap;
}

.ai-guest-help-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
}

.ai-guest-help-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.ai-guest-help-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #F6EFF6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 7px;
    transition: background 0.2s ease, transform 0.15s ease;
    box-sizing: border-box;
}

.ai-guest-help-item:hover .ai-guest-help-circle {
    background: #EFE4EF;
    transform: translateY(-1px);
}

.ai-guest-help-img {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
    object-fit: contain;
    display: block;
    filter: invert(18%) sepia(38%) saturate(1450%) hue-rotate(268deg) brightness(88%) contrast(95%);
}

.ai-guest-help-label {
    font-size: 11px;
    font-weight: 600;
    color: #4A404B;
    line-height: 1.25;
    text-align: center;
    display: block;
}

/* =========================================================
   Responsive Mobile & Tablet (<=1024px)
========================================================= */
@media (max-width: 1024px) {

    html.ai-chat-open,
    body.ai-chat-open {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        overflow: hidden !important;
        overscroll-behavior: none !important;
    }

    #aiChatModal:not([style*="display: none"]):not([style*="display:none"]) {
        position: fixed !important;
        top: var(--ai-vv-top, 0px) !important;
        left: 0 !important;
        right: 0 !important;
        bottom: auto !important;
        width: 100vw !important;
        height: var(--ai-vv-height, 100dvh) !important;
        max-height: var(--ai-vv-height, 100dvh) !important;
        z-index: 2147483647 !important;
        background: #ffffff !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: stretch !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        overscroll-behavior: none !important;
    }

    #aiChatModal[style*="display: none"],
    #aiChatModal[style*="display:none"] {
        display: none !important;
    }

    .ai-resize-handle {
        display: none !important;
    }

    .ai-chat-panel {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        flex: 1 1 auto !important;
    }

    .ai-chat-panel .chat-header {
        border-radius: 0 !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 30 !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }

    .ai-chat-panel .chat-header img,
    .ai-chat-panel .chat-header .chat-header-logo {
        height: 44px !important;
        max-height: 46px !important;
    }

    .ai-chat-panel .chat-header .ai-chat-maximize {
        display: none !important;
    }

    .ai-chat-panel .messages {
        padding: 14px 18px !important;
        min-height: 0 !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior-y: contain !important;
    }

    .ai-chat-panel .message-content {
        max-width: 85% !important;
        font-size: 15px !important;
        padding: 11px 16px !important;
        line-height: 1.45 !important;
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }

    .ai-chat-panel .message.ai .message-content {
        padding-right: 32px !important;
    }

    .ai-chat-panel .chat-input-area {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 30 !important;
        padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px)) 14px !important;
        gap: 10px !important;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08) !important;
    }

    .ai-chat-panel .ai-input-pill-wrapper {
        min-height: 46px !important;
        padding: 3px 6px 3px 14px !important;
    }

    .ai-chat-panel .chat-input {
        font-size: 16px !important;
        line-height: 22px !important;
    }

    .ai-emoji-picker-container {
        right: 8px !important;
        left: 8px !important;
        width: auto !important;
        max-width: none !important;
        bottom: calc(100% + 8px) !important;
    }

    .ai-chat-panel .suggestions {
        padding: 4px 14px 8px !important;
    }

    .ai-chat-panel .suggestion-chip {
        font-size: 13px !important;
        padding: 7px 14px !important;
    }

    .ai-history-panel {
        width: 85% !important;
        max-width: 360px !important;
        z-index: 1000000 !important;
    }

    .ai-history-backdrop {
        z-index: 999999 !important;
    }

    .ai-report-card {
        max-width: 100% !important;
    }

    .ai-msg-dropdown {
        min-width: 165px !important;
    }

    .ai-new-msg-pill {
        bottom: 80px !important;
        z-index: 50 !important;
    }

    .ai-guest-form-container {
        top: 56px !important;
        border-radius: 0 !important;
        padding: 14px 12px !important;
    }
}

/* =========================================================
   Micro-Screen Mobile (<=380px)
========================================================= */
@media (max-width: 380px) {
    .ai-chat-panel .chat-header {
        padding: 6px 10px !important;
        gap: 6px !important;
        min-height: 52px !important;
    }

    .ai-chat-panel .chat-header img,
    .ai-chat-panel .chat-header .chat-header-logo {
        height: 38px !important;
        max-height: 40px !important;
    }

    .ai-chat-panel .chat-header-actions {
        gap: 5px !important;
    }

    .ai-chat-panel .chat-header .ai-chat-history,
    .ai-chat-panel .chat-header .ai-chat-new,
    .ai-chat-panel .chat-header .ai-chat-close {
        width: 30px !important;
        height: 30px !important;
        min-width: 30px !important;
        min-height: 30px !important;
    }

    .ai-guest-help-grid {
        gap: 4px;
    }

    .ai-guest-help-circle {
        width: 38px;
        height: 38px;
        margin-bottom: 5px;
    }

    .ai-guest-help-img {
        width: 18px;
        height: 18px;
    }

    .ai-guest-help-label {
        font-size: 10px;
        line-height: 1.2;
    }
}

/* =========================================================
   Floating AI Support Trigger Button
========================================================= */
.ai-chat-trigger-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99998;
    background: linear-gradient(135deg, #6F3667, #55274F);
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    font-family: 'Quicksand', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 20px rgba(111, 54, 103, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.ai-chat-trigger-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(111, 54, 103, 0.45);
    background: linear-gradient(135deg, #7C3B73, #5F2C58);
}
@media (max-width: 767px) {
    .ai-chat-trigger-btn {
        bottom: 55px; /* Exactly 5px above the 50px mobile bottom navigation bar */
        right: 16px;
        padding: 10px 16px;
        font-size: 13px;
        box-shadow: 0 4px 15px rgba(111, 54, 103, 0.3);
    }
}
body.ai-chat-open .ai-chat-trigger-btn {
    display: none !important;
}