/* Focused responsive polish kept separate from the main Vite bundle so these
   small layout corrections stay isolated from the shared component system. */

@media (min-width: 1024px) {
    /* Browse/search/location pages: make the resting desktop search pill a
       little slimmer. Docked search keeps its existing compact dimensions. */
    .t-browse-topbar:not(.is-docked) .t-smart-search-shell {
        padding: 0.5rem;
    }

    .t-browse-topbar:not(.is-docked) .t-smart-search-segment {
        padding-block: 0.5rem;
    }
}

@media (max-width: 767.98px) {
    /* List cards on phones have enough room for slightly wider actions while
       still protecting the price column on the narrowest screens. */
    .t-listing-grid.is-list .t-card-actions {
        width: min(6.75rem, 52%);
    }
}

@media (max-width: 1023.98px) {
    /* Opening the language popover must temporarily resolve the mobile chrome
       as fully visible. Otherwise a partially retracted sticky search keeps
       its old progress and can visually cover the language panel. */
    body.t-popover-open {
        --t-chrome-progress: 0;
    }

    /* A transformed sticky header is its own stacking context. Raise that
       context only while the language popover is open so the dropdown sits
       above the docked search, without changing normal header/search layering. */
    body.t-popover-open .t-header {
        z-index: calc(var(--z-header) + 6);
    }
}

/* Inquiry confirmation: turn the small corner toast into a clear, centered
   success moment without changing the property page's existing Alpine flow. */
.t-inquiry-success-overlay {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-toast) + 2);
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgb(15 23 42 / 0.26);
    backdrop-filter: blur(3px);
    animation: tInquirySuccessIn 180ms ease-out both;
}

.t-inquiry-success-overlay.is-leaving {
    pointer-events: none;
    animation: tInquirySuccessOut 200ms ease-in both;
}

.t-inquiry-success-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 1rem;
    width: min(92vw, 34rem);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--brand) 38%, var(--t-border));
    border-radius: min(var(--t-radius), 24px);
    padding: 1.35rem 1.35rem 1.2rem;
    background: color-mix(in srgb, var(--t-surface) 96%, var(--brand-soft));
    color: var(--t-ink);
    box-shadow: 0 28px 70px -24px rgb(15 23 42 / 0.46);
    transform-origin: center;
    animation: tInquirySuccessCardIn 260ms cubic-bezier(.22, 1, .36, 1) both;
}

.t-inquiry-success-icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    flex: none;
    border-radius: 999px;
    color: var(--brand-contrast);
    background: var(--brand);
    box-shadow: 0 10px 28px -12px color-mix(in srgb, var(--brand) 65%, transparent);
}

.t-inquiry-success-icon svg {
    width: 1.45rem;
    height: 1.45rem;
}

.t-inquiry-success-body {
    min-width: 0;
    align-self: center;
}

.t-inquiry-success-eyebrow {
    display: block;
    margin-bottom: 0.18rem;
    color: var(--brand);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.t-inquiry-success-title {
    display: block;
    color: var(--t-ink);
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    line-height: 1.3;
}

.t-inquiry-success-copy {
    margin: 0.35rem 0 0;
    color: var(--t-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.t-inquiry-success-close {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    margin: -0.3rem -0.3rem 0 0;
    border: 0;
    border-radius: 999px;
    color: var(--t-muted);
    background: transparent;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease;
}

.t-inquiry-success-close:hover {
    color: var(--t-ink);
    background: var(--t-surface-2);
}

.t-inquiry-success-progress {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    overflow: hidden;
    background: color-mix(in srgb, var(--brand) 12%, transparent);
}

.t-inquiry-success-progress span {
    display: block;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    background: var(--brand);
    animation: tInquirySuccessProgress 12s linear forwards;
    will-change: transform;
}

@keyframes tInquirySuccessIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes tInquirySuccessOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes tInquirySuccessCardIn {
    from { opacity: 0; transform: translateY(10px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes tInquirySuccessProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 639.98px) {
    .t-inquiry-success-card {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.8rem;
        width: min(94vw, 31rem);
        padding: 1.1rem 1rem 1rem;
        border-radius: 20px;
    }

    .t-inquiry-success-icon {
        width: 2.65rem;
        height: 2.65rem;
    }

    .t-inquiry-success-copy {
        font-size: 0.82rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    /* Keep the functional 12-second countdown visible even when decorative
       motion is reduced; otherwise the modal still auto-closes while its
       progress line appears frozen. */
    .t-inquiry-success-overlay,
    .t-inquiry-success-card {
        animation: none !important;
    }

    .t-inquiry-success-progress span {
        animation: tInquirySuccessProgress 12s linear forwards !important;
    }
}
