/* ==========================================================
   DhanBhumi AI – Base Styles
   Applies to #ask-ai-modal and all children
========================================================== */

@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

/* ── Root modal font ────────────────────────────────────── */
#ask-ai-modal,
#ask-ai-modal * {
    font-family:
        "Plus Jakarta Sans",
        "Segoe UI",
        system-ui,
        -apple-system,
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

/* ── Sidebar base text ──────────────────────────────────── */
#ask-ai-left-sidebar {
    font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    position: relative;
    z-index: 40;
    width: clamp(248px, 19vw, 286px);
    min-width: clamp(248px, 19vw, 286px);
    max-width: clamp(248px, 19vw, 286px);
    background: #ffffff;
    border-right: 1px solid #e7dfc9;
    overflow-x: hidden;
}

#ask-ai-center-workspace {
    min-width: 0;
    flex: 1 1 auto;
}

#ask-ai-center-header .ai-header-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #1f2937;
    cursor: pointer;
    transform: none;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

#ask-ai-center-header .ai-header-close-btn:hover {
    border: 0;
    background: #f3f4f1;
    color: #1f5a43;
    transform: none;
}

#ask-ai-center-header .ai-header-close-btn:focus-visible {
    outline: 2px solid rgba(31, 90, 67, 0.35);
    outline-offset: 2px;
}

#ask-ai-center-header .ai-header-close-icon {
    display: block;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

#ask-ai-center-header .ai-mobile-menu-btn {
    align-items: center;
    justify-content: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #1f5a43;
    cursor: pointer;
    transition: color 0.2s ease;
}

#ask-ai-center-header .ai-mobile-menu-btn:hover {
    border: 0;
    background: transparent;
    color: #b88a2d;
}

#ask-ai-center-header .ai-mobile-menu-btn:focus-visible {
    outline: 2px solid rgba(31, 90, 67, 0.35);
    outline-offset: -4px;
}

#ask-ai-left-sidebar .ai-sidebar-shell {
    height: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    min-width: 0;
    overflow-x: hidden;
}

#ask-ai-left-sidebar .ai-sidebar-main {
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: hidden;
    overflow-x: hidden;
}

#ask-ai-left-sidebar .ai-sidebar-brand {
    min-height: 36px;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#ask-ai-left-sidebar .ai-sidebar-brand img[alt="DhanBhumi Logo"] {
    display: block;
    width: auto;
    max-width: min(176px, calc(100% - 48px));
    height: auto;
    max-height: 32px;
    min-width: 0;
    object-fit: contain;
    flex: 0 1 auto;
}

#ask-ai-left-sidebar .ai-sidebar-dismiss {
    display: none;
    width: 36px;
    height: 36px;
    min-width: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e7dfc9;
    border-radius: 999px;
    background: #ffffff;
    color: #1f5a43;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

#ask-ai-left-sidebar .ai-sidebar-dismiss:hover {
    border-color: #b88a2d;
    background: #fffaf1;
    transform: translateY(-1px);
}

#ask-ai-left-sidebar .ai-sidebar-content-groups {
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 24px;
    overflow-x: hidden;
}

#ask-ai-left-sidebar .ai-sidebar-panel {
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#ask-ai-left-sidebar .ai-sidebar-history-panel {
    flex: 1 1 auto;
    overflow: hidden;
}

#ask-ai-left-sidebar .ai-sidebar-scroll-region {
    min-width: 0;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#ask-ai-left-sidebar .ai-sidebar-scroll-region::-webkit-scrollbar {
    display: none;
}

#ask-ai-left-sidebar .ai-sidebar-history-scroller {
    flex: 1 1 auto;
    height: auto;
    max-height: none;
}

#ask-ai-left-sidebar .ai-sidebar-shortcuts-scroller {
    height: min(22vh, 176px);
}

#ask-ai-left-sidebar .ai-sidebar-footer {
    flex-shrink: 0;
    margin-top: 16px;
    padding-top: 16px;
    min-width: 0;
    overflow-x: hidden;
}

#ask-ai-left-sidebar.ai-sidebar-closing {
    pointer-events: none !important;
}

#ask-ai-left-sidebar.ai-sidebar-closing .ai-sidebar-search,
#ask-ai-left-sidebar.ai-sidebar-closing .ai-sidebar-content-groups,
#ask-ai-left-sidebar.ai-sidebar-closing .ai-sidebar-label,
#ask-ai-left-sidebar.ai-sidebar-closing .ai-sidebar-chevron {
    opacity: 0;
    visibility: hidden;
}

#ask-ai-filter-modal.ai-filter-modal-layer {
    align-items: flex-start;
    justify-content: center;
    padding: 84px 20px 96px;
}

#ask-ai-filter-backdrop {
    cursor: default;
}

#ask-ai-filter-modal .ai-filter-sheet {
    display: flex;
    width: min(760px, calc(100% - 24px));
    max-height: min(620px, calc(100% - 24px));
    min-height: 0;
    flex-direction: column;
    border-radius: 18px;
    background: #ffffff;
    animation: ai-filter-sheet-in 0.2s ease both;
}

#ask-ai-filter-modal .ai-filter-modal-header,
#ask-ai-filter-modal .ai-filter-modal-footer {
    flex: 0 0 auto;
    background: #ffffff;
    padding: 14px 16px !important;
}

#ask-ai-filter-modal .ai-filter-modal-header {
    border-bottom-color: rgba(231, 223, 201, 0.72) !important;
}

#ask-ai-filter-modal .ai-filter-modal-footer {
    gap: 10px !important;
    border-top-color: rgba(231, 223, 201, 0.72) !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

#ask-ai-filter-modal .ai-filter-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: #ffffff;
    padding: 12px 16px 10px !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(31, 90, 67, 0.35) transparent;
}

#ask-ai-filter-modal .ai-filter-modal-body::-webkit-scrollbar {
    width: 6px;
}

#ask-ai-filter-modal .ai-filter-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

#ask-ai-filter-modal .ai-filter-modal-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(31, 90, 67, 0.32);
}

#ask-ai-filter-modal .ai-filter-kicker {
    display: inline-flex;
    margin-bottom: 3px;
    color: #9b701f;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.16em;
    line-height: 1;
    text-transform: uppercase;
}

#ask-ai-filter-modal .ai-filter-close-btn {
    border: 1px solid rgba(231, 223, 201, 0.95);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
}

#ask-ai-filter-modal .ai-filter-close-btn:hover {
    border-color: #b88a2d;
    color: #1f5a43;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
}



#ask-ai-filter-modal .ai-filter-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px 10px;
}

#ask-ai-filter-modal .ai-filter-row-label {
    color: #9b701f;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.14em;
    line-height: 1.2;
    text-transform: uppercase;
}

#ask-ai-filter-modal .ai-filter-row-control {
    min-width: 0;
}

#ask-ai-filter-modal .ai-filter-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 0;
}

#ask-ai-filter-modal .ai-filter-pill,
#ask-ai-filter-modal .ai-filter-check {
    min-height: 28px;
    border: 1px solid rgba(231, 223, 201, 0.95);
    border-radius: 999px;
    background: #ffffff;
    color: #222222;
    padding: 0 11px;
    font-size: 10px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 7px 18px rgba(17, 24, 39, 0.045);
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

#ask-ai-filter-modal .ai-filter-pill:hover,
#ask-ai-filter-modal .ai-filter-check:hover {
    border-color: #b88a2d;
    color: #222222;
    box-shadow: 0 9px 20px rgba(17, 24, 39, 0.09);
    transform: translateY(-1px);
}

#ask-ai-filter-modal .ai-filter-pill.is-active,
#ask-ai-filter-modal .ai-filter-check:has(input:checked) {
    border-color: #1f5a43;
    color: #1f5a43;
    box-shadow: 0 8px 18px rgba(31, 90, 67, 0.1);
}

#ask-ai-filter-modal .ai-filter-pill-row--primary .ai-filter-pill {
    min-width: 96px;
}

#ask-ai-filter-modal .ai-filter-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

#ask-ai-filter-modal .ai-filter-input-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 8px;
    max-width: 360px;
}

#ask-ai-filter-modal .ai-filter-field span {
    color: #9b701f;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

#ask-ai-filter-modal .ai-filter-field input,
#ask-ai-filter-modal .ai-filter-field select {
    width: 100%;
    min-height: 32px;
    border: 1px solid #e7dfc9;
    border-radius: 10px;
    background: #ffffff;
    padding: 0 10px;
    color: #222222;
    font-size: 11px;
    font-weight: 650;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

#ask-ai-filter-modal .ai-filter-field input::placeholder {
    color: #9a9a9a;
    font-weight: 550;
}

#ask-ai-filter-modal .ai-filter-field input:focus,
#ask-ai-filter-modal .ai-filter-field select:focus {
    border-color: #1f5a43;
    background: #fffdf8;
    box-shadow: 0 0 0 3px rgba(31, 90, 67, 0.08);
}

#ask-ai-filter-modal .ai-filter-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

#ask-ai-filter-modal .ai-filter-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#ask-ai-filter-modal .ai-filter-check input {
    width: 12px;
    height: 12px;
    accent-color: #1f5a43;
}

#ask-ai-filter-modal .ai-filter-reset-btn,
#ask-ai-filter-modal .ai-filter-apply-btn {
    min-height: 36px;
    min-width: 92px;
}

#ask-ai-filter-modal .ai-filter-reset-btn {
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
}

#ask-ai-filter-modal .ai-filter-apply-btn {
    box-shadow: 0 12px 26px rgba(31, 90, 67, 0.18);
}

/* Expert callback modal */
#ask-ai-expert-modal.ai-expert-modal {
    z-index: 125;
}

#ask-ai-expert-modal .ai-expert-dialog {
    width: 100%;
    max-width: 430px;
    animation: aiExpertDialogIn 180ms ease-out both;
}

#ask-ai-expert-modal .ai-expert-fields {
    display: grid;
    padding: 20px;
}

#ask-ai-expert-modal .ai-expert-fields > div {
    min-width: 0;
}

#ask-ai-expert-modal .ai-expert-input {
    box-sizing: border-box;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

#ask-ai-expert-modal .ai-expert-input:hover {
    border-color: #D7C9AA;
}

#ask-ai-expert-modal .ai-expert-input:focus {
    border-color: #1F5A43;
    box-shadow: 0 0 0 3px rgba(31, 90, 67, 0.1);
}

#ask-ai-expert-modal .ai-expert-input.is-invalid {
    border-color: #C66B61;
    background: #FFFCFA;
}

#ask-ai-expert-modal .ai-expert-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(198, 107, 97, 0.1);
}

#ask-ai-expert-modal .ai-expert-submit:focus-visible,
#ask-ai-expert-modal .ai-expert-close:focus-visible {
    outline: 2px solid #B88A2D;
    outline-offset: 2px;
}

@keyframes aiExpertDialogIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ai-result-filter-strip {
    width: 100%;
    border: 1px solid rgba(231, 223, 201, 0.62);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    padding: 10px;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
}

.ai-result-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ai-result-filter-toggle,
.ai-result-filter-clear,
.ai-result-filter-chip {
    appearance: none;
    border: 0;
    font-family: inherit;
}

.ai-result-filter-toggle {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 8px;
    border: 1px solid #e7dfc9;
    border-radius: 999px;
    background: #ffffff;
    color: #222222;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease;
}

.ai-result-filter-toggle:hover {
    border-color: #b88a2d;
    color: #1f5a43;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.11);
}

.ai-result-filter-toggle svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
}

.ai-result-filter-toggle strong {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #1f5a43;
    color: #f0f4f2;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
}

.ai-result-filter-chevron {
    transition: transform 0.2s ease;
}

.ai-result-filter-strip.is-expanded .ai-result-filter-chevron {
    transform: rotate(180deg);
}

.ai-result-filter-clear {
    background: transparent;
    color: #6b7280;
    padding: 0;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
    transition: color 0.2s ease;
}

.ai-result-filter-clear:hover {
    color: #1f5a43;
}

.ai-result-filter-clear:disabled {
    color: #b8b8b8;
    cursor: default;
}

.ai-result-filter-applied {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ai-result-filter-empty {
    color: #777777;
    font-size: 12px;
    font-weight: 700;
}

.ai-result-filter-chip {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(231, 223, 201, 0.9);
    border-radius: 999px;
    background: #ffffff;
    color: #222222;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.ai-result-filter-chip:hover {
    border-color: #b88a2d;
    color: #111111;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.1);
    transform: translateY(-1px);
}

.ai-result-filter-chip.is-applied {
    border-color: #1f5a43;
    background: #1f5a43;
    color: #ffffff;
}

.ai-result-filter-chip.is-applied:hover {
    border-color: #174734;
    background: #174734;
    color: #ffffff;
}

.ai-result-filter-chip.is-active {
    border: 1.5px solid #1f5a43 !important;
    color: #1f5a43 !important;
    box-shadow: 0 8px 18px rgba(31, 90, 67, 0.1) !important;
}

.ai-result-filter-panel {
    margin-top: 12px;
    border-top: 1px solid rgba(231, 223, 201, 0.68);
    padding-top: 12px;
}

.ai-result-filter-group {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    margin-top: 10px;
}

.ai-result-filter-group:first-child {
    margin-top: 0;
}

.ai-result-filter-label {
    padding-top: 9px;
    color: #6b7280;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ai-result-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}

@keyframes ai-filter-sheet-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }

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

/* Section labels — TODAY / YESTERDAY / SAVED SEARCHES */
#ask-ai-left-sidebar .ai-sidebar-section-title span {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9b701f;
    font-family: inherit;
}

/* History / saved search item text */
#ask-ai-left-sidebar .tw-group span {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    font-family: inherit;
}

#ask-ai-left-sidebar .ai-sidebar-history-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: #222222;
}

#ask-ai-left-sidebar .ai-sidebar-history-preview {
    font-size: 10px;
    font-weight: 500;
    line-height: 1.45;
    color: #7a7a7a;
}

#ask-ai-left-sidebar .ai-sidebar-history-time {
    font-size: 9px;
    font-weight: 600;
    line-height: 1;
    color: #9a9a9a;
    white-space: nowrap;
}

/* Timestamp text */
#ask-ai-left-sidebar .tw-text-\[10px\] {
    font-size: 10px;
    font-weight: 400;
    color: #888888;
    font-family: inherit;
}

/* AI Tip label */
#ask-ai-left-sidebar .ai-sidebar-tip .tw-text-\[10px\] {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1f5a43;
}

/* AI Tip body text */
#ask-ai-left-sidebar .ai-sidebar-tip p {
    font-size: 11px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.55;
    color: #555555;
    margin: 0;
}

/* New Conversation button */
#ask-ai-left-sidebar .ai-sidebar-new-chat {
    box-sizing: border-box;
    height: 38px;
    min-height: 38px;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#ask-ai-sidebar-search-input {
    box-sizing: border-box;
    height: 38px;
}

#ask-ai-left-sidebar button .ai-sidebar-label {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Footer labels */
#ask-ai-left-sidebar .ai-sidebar-label.tw-font-bold {
    font-size: 12px;
    font-weight: 700;
}

#ask-ai-left-sidebar .ai-sidebar-collection-toggle {
    position: relative;
}

#ask-ai-left-sidebar .ai-sidebar-count-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #faf8f5;
    box-shadow: 0 4px 12px rgba(31, 90, 67, 0.16);
    line-height: 1;
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
}

/* ── Mobile sidebar typography refinements ──────────────── */
@media (max-width: 640px) {
    /* Slightly larger text for touch-friendliness */
    #ask-ai-left-sidebar .tw-group span,
    #ask-ai-left-sidebar .tw-text-xs {
        font-size: 13px !important;
        line-height: 1.5 !important;
        font-weight: 500 !important;
    }

    /* Section labels */
    #ask-ai-left-sidebar .ai-sidebar-section-title span {
        font-size: 10px;
        letter-spacing: 0.14em;
    }

    /* Timestamps */
    #ask-ai-left-sidebar .tw-text-\[10px\] {
        font-size: 11px;
    }

    /* "New Conversation" button */
    #ask-ai-left-sidebar button .ai-sidebar-label {
        font-size: 14px;
    }

    /* Footer items */
    #ask-ai-left-sidebar .ai-sidebar-label.tw-font-bold {
        font-size: 13px;
    }

    /* AI tip */
    #ask-ai-left-sidebar .ai-sidebar-tip p {
        font-size: 12px;
        line-height: 1.6;
    }

    /* Touch target minimum height for rows */
    #ask-ai-left-sidebar .tw-group {
        min-height: 44px;
    }
}

/* ==========================================================
   DhanBhumi AI Chat Input
========================================================== */

.chat-input-container {
    border: 2px solid #e7dfc9 !important;
    background: #ffffff !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 10px 30px rgba(31, 90, 67, 0.06) !important;
    transition: all 0.25s ease;
}

.chat-input-container:focus-within {
    border-color: #b88a2d !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 15px 40px rgba(184, 138, 45, 0.12) !important;
}

.chat-send-btn {
    transition:
        transform 0.25s ease,
        background-color 0.25s ease,
        opacity 0.25s ease;
}

.chat-send-btn:hover {
    background-color: #123f2e !important;
}

.chat-send-btn:hover .chat-arrow-svg {
    transform: translateX(3px);
}

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

.chat-arrow-svg {
    transition: transform 0.25s ease;
}

#ask-ai-center-header .ai-header-auth-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 15px 0 11px;
    border: 1px solid rgba(231, 223, 201, 0.96);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #fdfbf7 100%);
    color: #1f5a43;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow:
        0 8px 22px rgba(31, 90, 67, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    transition:
        border-color 0.24s ease,
        background-color 0.24s ease,
        color 0.24s ease,
        box-shadow 0.24s ease,
        transform 0.24s ease;
}

#ask-ai-center-header .ai-header-auth-link:hover {
    border-color: #b88a2d;
    background: linear-gradient(180deg, #fffcf6 0%, #faf3e5 100%);
    color: #174734;
    box-shadow:
        0 12px 28px rgba(31, 90, 67, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
    transform: translateY(-1px);
}

#ask-ai-center-header .ai-header-auth-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: #b88a2d;
    flex: 0 0 auto;
    transition:
        color 0.24s ease,
        transform 0.24s ease;
}

#ask-ai-center-header .ai-header-auth-link:hover .ai-header-auth-icon {
    color: #9b701f;
    transform: translateY(-0.5px);
}

#ask-ai-center-header .ai-header-auth-label {
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.01em;
    color: inherit;
}

#ask-ai-preference-chips > button {
    background: #ffffff !important;
    color: #222222 !important;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.14) !important;
}

#ask-ai-preference-chips > button:hover {
    background: #ffffff !important;
    color: #111111 !important;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18) !important;
}

/* ==========================================================
   DhanBhumi AI Live Progress
========================================================== */

.ai-live-progress-track {
    --ai-progress-duration: 1800ms;
    --ai-progress-shimmer-duration: 900ms;
    position: relative;
    width: 100%;
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background:
        linear-gradient(90deg, rgba(231, 223, 201, 0.55) 0%, rgba(231, 223, 201, 0.82) 100%);
    box-shadow:
        inset 0 1px 2px rgba(31, 90, 67, 0.08),
        inset 0 0 0 1px rgba(184, 138, 45, 0.08);
}

.ai-live-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    border-radius: 999px;
    overflow: visible;
    background:
        linear-gradient(90deg, #b88a2d 0%, #1f5a43 54%, #2b7a5a 100%);
    background-size: 180% 100%;
    box-shadow:
        0 0 0 1px rgba(31, 90, 67, 0.08),
        0 0 16px rgba(31, 90, 67, 0.16);
    will-change: width, opacity;
    transition:
        width var(--ai-progress-duration) cubic-bezier(0.32, 0, 0.2, 1),
        opacity 220ms ease,
        filter 220ms ease;
}

.ai-live-progress-fill::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: repeating-linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0 8px,
        rgba(255, 255, 255, 0.18) 8px 16px,
        rgba(255, 255, 255, 0.08) 16px 24px
    );
    mix-blend-mode: screen;
    opacity: 0.32;
}

.ai-live-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 18%,
        rgba(255, 255, 255, 0.62) 50%,
        rgba(255, 255, 255, 0.1) 82%,
        transparent 100%
    );
    transform: translateX(-120%);
    opacity: 0;
}

.ai-live-progress-track.ai-live-progress-active .ai-live-progress-fill::after {
    opacity: 1;
    animation: ai-live-progress-shimmer var(--ai-progress-shimmer-duration) linear 1 forwards;
}

.ai-live-progress-glow {
    position: absolute;
    top: 50%;
    right: -10px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.98) 0%, rgba(184, 138, 45, 0.9) 42%, rgba(184, 138, 45, 0) 72%);
    transform: translateY(-50%);
    opacity: 0.66;
    filter: blur(0.4px);
    box-shadow: 0 0 12px rgba(184, 138, 45, 0.32);
    transition:
        opacity 220ms ease,
        transform 220ms ease,
        box-shadow 220ms ease;
}

.ai-live-progress-track.ai-live-progress-complete .ai-live-progress-glow {
    opacity: 0.96;
    transform: translateY(-50%) scale(1.04);
    box-shadow: 0 0 14px rgba(184, 138, 45, 0.42);
}

@keyframes ai-live-progress-shimmer {
    0% {
        transform: translateX(-120%);
    }
    100% {
        transform: translateX(180%);
    }
}

/* ==========================================================
   DhanBhumi AI Property Card Side Navigation
========================================================== */

.ai-property-carousel-shell {
    position: relative;
    width: 100%;
    padding: 0 46px;
}

.ai-property-carousel-viewport {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.ai-property-carousel-track {
    display: flex;
    gap: 12px;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.ai-property-card {
    min-width: 0;
    container-type: inline-size;
}

.ai-property-carousel-track .ai-property-card {
    flex: 0 0 calc((100% - 24px) / 3);
    max-width: calc((100% - 24px) / 3);
}

/* Side arrow buttons */
.ai-property-nav-btn {
    position: absolute;
    top: 50%;
    z-index: 25;

    width: 38px;
    height: 38px;
    border-radius: 999px;

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

    border: 1px solid #e7dfc9;
    background: #ffffff;
    color: #1f5a43;

    cursor: pointer;
    box-shadow: 0 10px 24px rgba(31, 90, 67, 0.12);

    transform: translateY(-50%);
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        color 0.22s ease,
        opacity 0.22s ease,
        transform 0.22s ease;
}

.ai-property-nav-btn:hover {
    background: #1f5a43;
    border-color: #1f5a43;
    color: #ffffff;
    transform: translateY(-50%) scale(1.05);
}

.ai-property-nav-prev {
    left: 0;
}

.ai-property-nav-next {
    right: 0;
}

#ask-ai-prev-btn:disabled,
#ask-ai-next-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Tablet: 2 cards visible */
@media (min-width: 641px) and (max-width: 1024px) {
    .ai-property-carousel-track .ai-property-card {
        flex: 0 0 calc((100% - 12px) / 2);
        max-width: calc((100% - 12px) / 2);
    }
}

@container (max-width: 230px) {
    .ai-property-card .ai-property-card-media {
        height: 150px !important;
    }

    .ai-property-card .ai-property-card-body {
        padding: 14px !important;
    }

    .ai-property-card .ai-property-card-price-row {
        align-items: flex-start !important;
        flex-direction: column;
        gap: 2px;
    }

    .ai-property-card .ai-property-card-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) 40px;
        gap: 6px !important;
    }

    .ai-property-card .ai-property-card-actions [data-ai-card-detail],
    .ai-property-card .ai-property-card-actions > a {
        grid-column: 1 / -1;
        width: 100%;
    }

    .ai-property-card .ai-property-card-actions .js-ai-compare {
        width: 100%;
        min-width: 0;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .ai-property-card .ai-property-card-actions .js-ai-bookmark {
        width: 40px !important;
        min-width: 40px;
    }
}

/* Phone: stacked cards, no carousel buttons */
@media (max-width: 640px) {
    .ai-property-carousel-shell {
        padding: 0;
    }

    .ai-property-carousel-viewport {
        overflow: visible;
    }

    .ai-property-carousel-track {
        display: grid;
        grid-template-columns: 1fr;
        transform: none !important;
    }

    .ai-property-carousel-track .ai-property-card {
        flex: unset;
        max-width: 100%;
    }

    .ai-property-nav-btn {
        display: none !important;
    }
}

.ai-typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    border: 1px solid rgba(231, 223, 201, 0.7);
}

.ai-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #b88a2d;
    opacity: 0.35;
    animation: aiTypingDotPulse 1.05s ease-in-out infinite;
}

.ai-typing-dot:nth-child(2) {
    background: #1f5a43;
    animation-delay: 0.15s;
}

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

@keyframes aiTypingDotPulse {
    0%,
    80%,
    100% {
        opacity: 0.35;
        transform: translateY(0);
    }

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