/* RN parity for Marketplace, listing pickers and Bookings/Orders filters. */
body .tt-native-dialog {
    --tt-dialog-rest: translateY(-100%);
    position: fixed; inset: auto; top: calc(var(--app-viewport-top, 0px) + var(--app-height, 100dvh)); left: 0;
    margin: 0; padding: 0; width: 100%; max-width: none;
    max-height: calc(var(--app-height, 100dvh) * .85);
    border: 1px solid rgba(255,255,255,.12); border-radius: 20px 20px 0 0;
    background: #141414; color: #fff; overflow: hidden; box-sizing: border-box;
    transform: var(--tt-dialog-rest);
}
body .tt-native-dialog[open] { display: flex; flex-direction: column; animation: tt-dialog-enter .3s cubic-bezier(.2,.7,.2,1); }
body .tt-native-dialog::backdrop { background: rgba(0,0,0,.65); }
body .tt-fullpage-mobile {
    --tt-dialog-rest: translateY(0);
    top: var(--app-viewport-top, 0px); height: var(--app-height, 100dvh); max-height: var(--app-height, 100dvh);
    border: 0; border-radius: 0;
}
body .tt-native-dialog > :first-child { min-height: 0; max-height: inherit; width: 100%; }
body .mkt-category-sheet__surface, body .listing-condition-sheet { max-height: inherit; border: 0; border-radius: inherit; }
body .mkt-category-sheet__options { flex: 1; max-height: none; padding-top: 8px; scrollbar-width: thin; }
body .mkt-category-sheet__header {
    display: grid; grid-template-columns: 64px minmax(0,1fr) 64px; gap: 8px; padding: 8px 16px; min-height: 60px;
}
body .mkt-category-sheet__header h2 { text-align: center; font-size: 16px; font-weight: 700; }
body .mkt-category-sheet__header .tt-dialog-close {
    width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%;
    background: rgba(255,255,255,.08); color: #9ca3af; display: grid; place-items: center;
}
body .mkt-category-sheet__header [data-category-clear] { min-height: 44px; font-size: 13px; color: #9ca3af; text-align: right; }
body .mkt-category-sheet__header [data-category-clear]:disabled { opacity: .4; }
body .mkt-category-sheet .mkt-cat-item { border: 0; display: flex; align-items: center; font-size: 14px; line-height: 20px; }
body .mkt-category-sheet .mkt-cat-check { order: 2; margin-left: auto; color: #fff; flex-shrink: 0; }
body .mkt-category-sheet .mkt-sort-item { min-height: 48px; padding: 14px 20px; font-size: 14px; line-height: 20px; white-space: normal; }
body .mkt-category-sheet .mkt-sort-item.active { background: rgba(255,255,255,.04); }
body .cat-picker-options, body .listing-address-content, body .listing-condition-sheet [data-condition-options] { overscroll-behavior: contain; scroll-padding-block: 16px; }
body .cat-picker-options .cat-option:last-child, body .listing-condition-option:last-child { border-bottom: 0; }
body .listing-condition-option { flex-direction: row-reverse; justify-content: space-between; }
body .listing-condition-option span { flex: 1; min-width: 0; }
body .listing-condition-sheet h2 { font-size: 18px; line-height: 24px; }
body .listing-search-header { padding-top: 0; min-height: 56px; }
body .listing-search-header h2 { font-size: 18px; }
/* The same modal triggers are used at every size; keep real form controls for submission. */
body .cat-mobile-trigger, body .listing-address-mobile-ready .listing-address-trigger,
body .condition-picker-ready .listing-condition-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px;
    padding: 10px 12px; border: 1px solid #34383e; border-radius: 10px; background: #0f1113;
    color: #e5e7eb; font-size: 14px; line-height: 20px; text-align: left;
}
body .cat-multi-select { border: 0; background: transparent; }
body .cat-mobile-trigger [data-category-summary] { flex: 1; min-width: 0; }
body .cat-mobile-trigger .cat-trigger-icon { width: 20px; height: 20px; flex: 0 0 20px; color: #9ca3af; }
body .cat-search-input { display: none; }
body .cat-multi-selected { min-height: 0; padding: 8px 0 0; cursor: default; }
body .cat-multi-selected:not(:has(.cat-tag)) { display: none; }
body .condition-picker-ready #listingCondition, body .listing-address-mobile-ready #listingAddressHome {
    position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none;
}
body .listing-address-dialog #listingAddressHost { position: relative; width: auto; height: auto; opacity: 1; pointer-events: auto; }
body .listing-condition-trigger.is-empty, body .cat-mobile-trigger.is-empty [data-category-summary] { color: #9ca3af; }
body .listing-condition-option { border-bottom: 0; }

/* Existing filter controllers retain draft/apply semantics and focus handling. */
body .fp2, body .filter-panel {
    --tt-filter-rest: translateY(-100%);
    position: fixed; top: calc(var(--app-viewport-top, 0px) + var(--app-height, 100dvh)); left: 0; right: auto; bottom: auto;
    width: 100%; max-width: none; height: calc(var(--app-height, 100dvh) * .9); max-height: calc(var(--app-height, 100dvh) * .9);
    border: 1px solid rgba(255,255,255,.12); border-radius: 20px 20px 0 0; background: #141414; overflow: hidden;
    display: flex; flex-direction: column; box-sizing: border-box; z-index: 10051;
    visibility: hidden; opacity: 0; pointer-events: none;
    transform: var(--tt-filter-rest) translateY(100vh);
    transition: transform .3s cubic-bezier(.2,.7,.2,1), opacity .25s, visibility 0s .3s;
    box-shadow: 0 12px 48px rgba(0,0,0,.4);
}
body .filter-panel {
    --tt-filter-rest: translateY(0);
    top: var(--app-viewport-top, 0px); height: var(--app-height,100dvh); max-height: var(--app-height,100dvh);
    border: 0; border-radius: 0;
}
body .fp2.active, body .filter-panel.active { visibility: visible; opacity: 1; pointer-events: auto; transform: var(--tt-filter-rest); transition-delay: 0s; }
body .fp2-overlay, body .filter-panel-overlay {
    display: block; z-index: 10050; background: rgba(0,0,0,.65); backdrop-filter: none; -webkit-backdrop-filter: none;
    opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s, visibility 0s .3s;
}
body .fp2-overlay.active, body .filter-panel-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
body .fp2::before { content: ''; flex-shrink: 0; width: 40px; height: 4px; border-radius: 2px; margin: 12px auto 4px; background: rgba(255,255,255,.2); }
body .fp2__header, body .filter-panel-header {
    display: grid; grid-template-columns: 80px minmax(0,1fr) 80px; align-items: center; gap: 8px;
    min-height: 60px; height: auto; padding: 8px 20px; box-sizing: border-box;
}
body .filter-panel-header-left { display: contents; }
body .fp2__close { margin-right: 0; }
body .fp2__title, body .filter-panel-title { font-size: 16px; font-weight: 700; min-width: 0; text-align: center; }
body .fp2__clear-all, body .filter-panel-clear { font-size: 13px; min-height: 44px; padding: 0; }
body .fp2__body, body .filter-panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 16px; }
body .fp2__footer, body .filter-panel-footer { flex-shrink: 0; border-top: 0; padding: 14px 20px max(14px,env(safe-area-inset-bottom)); }
body .fp2__check-item:last-child, body .filter-sort-option:last-child, body .filter-panel-section:last-child { border-bottom: 0; }
body .fp2__price-input, body .fp2__search-input { border: 1px solid #34383e; background: #0f1113; border-radius: 10px; }
body .fp2__price-input:focus, body .fp2__search-input:focus { background: #17191c; border-color: #8a929e; outline: none; box-shadow: none; }
body .filter-amount-field, body .filter-date-field input { background: #1e1e1e; }
body .filter-date-field input { padding-right: 40px; min-height: 44px; }
body .filter-date-field { position: relative; }
body .filter-date-field::after {
    content: ''; position: absolute; right: 12px; bottom: 13px; width: 18px; height: 18px; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M16 3v4M8 3v4M3 11h18'/%3E%3C/svg%3E") center/contain no-repeat;
}
body .filter-date-field input::-webkit-calendar-picker-indicator { opacity: 0; cursor: pointer; position: absolute; right: 10px; width: 24px; height: 24px; }


    html.tt-dialog-desktop body .tt-native-dialog {
        --tt-dialog-rest: translate(-50%,-50%);
        top: calc(var(--app-viewport-top, 0px) + var(--app-height,100dvh) / 2); left: 50%;
        width: min(var(--tt-modal-width,576px),calc(100vw - 48px)); height: auto;
        max-height: calc(var(--app-height,100dvh) - 48px); border: 1px solid rgba(255,255,255,.12); border-radius: 20px;
    }
    html.tt-dialog-desktop body .tt-fullpage-mobile { height: calc(var(--app-height,100dvh) - 48px); }
    html.tt-dialog-desktop body #listingAddressDialog {
        height: auto; min-height: min(240px,calc(var(--app-height,100dvh) - 48px));
        max-height: min(480px,calc(var(--app-height,100dvh) - 48px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)));
        background: #141414;
    }
    html.tt-dialog-desktop body #listingAddressDialog .listing-address-shell { height: auto; max-height: inherit; }
    html.tt-dialog-desktop body #listingAddressDialog .listing-address-content { flex: 1 1 auto; }
    html.tt-dialog-desktop body #listingAddressDialog.address-height-ready { transition: height 260ms cubic-bezier(.2,.7,.2,1); }
    @media (prefers-reduced-motion: reduce) {
        html.tt-dialog-desktop body #listingAddressDialog.address-height-ready { transition: none; }
    }
    body #listingAddressDialog::backdrop { background: rgba(0,0,0,.6); }
    html.tt-dialog-desktop body .tt-native-dialog .mkt-category-sheet__handle, html.tt-dialog-desktop body .tt-native-dialog .listing-condition-handle { display: none; }
    html.tt-dialog-desktop body .mkt-category-sheet { --tt-modal-width: 480px; }
    html.tt-dialog-desktop body #mktSortSheet { --tt-modal-width: 420px; }
    html.tt-dialog-desktop body .fp2, html.tt-dialog-desktop body .filter-panel {
        --tt-filter-rest: translate(-50%,-50%);
        top: calc(var(--app-viewport-top,0px) + var(--app-height,100dvh) / 2); left: 50%;
        width: min(576px,calc(100vw - 48px)); height: calc(var(--app-height,100dvh) - 48px); max-height: calc(var(--app-height,100dvh) - 48px);
        border: 1px solid rgba(255,255,255,.12); border-radius: 20px;
    }
    html.tt-dialog-desktop body .fp2::before { display: none; }
    html.tt-dialog-desktop body .fp2__footer, html.tt-dialog-desktop body .filter-panel-footer { padding-bottom: 14px; }
@keyframes tt-dialog-enter { from { transform: var(--tt-dialog-rest) translateY(100vh); opacity: 0; } to { transform: var(--tt-dialog-rest); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    body .tt-native-dialog[open] { animation: none; }
    body .fp2, body .filter-panel, body .fp2-overlay, body .filter-panel-overlay { transition: none; }
}
@supports (-webkit-touch-callout: none) {
    body .fp2 input, body .filter-panel input, body .tt-native-dialog input, body .listing-condition-trigger, body .cat-mobile-trigger { font-size: 16px; }
}
body .mkt-search-row [data-open-filter], body .mkt-search-input-wrap [data-open-filter], body [data-open-filter].filter-icon { display: flex; align-items: center; justify-content: center; width: 44px; min-height: 44px; flex-shrink: 0; }
body .listing-address-trigger svg { width: 20px; height: 20px; flex-shrink: 0; color: #9ca3af; }
body .listing-address-trigger .listing-address-location-icon { display: block; flex: 0 0 20px; align-self: center; }
body .listing-address-trigger .listing-address-chevron { display: block; width: 18px; height: 18px; flex: 0 0 18px; align-self: center; }
body .listing-address-trigger.is-empty .listing-address-primary { color: #9ca3af; font-weight: 400; }
body .listing-address-trigger [data-address-summary] { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
body .listing-address-secondary { color: #9ca3af; font-size: 13px; line-height: 19px; }

body .fp2__result-count { display: none; }
body .filter-panel-section { padding: 20px; }
/* Set Location keeps its own tested discovery/search flow and RN's 620px cap. */
body .tt-location-gate h1 { font-size: 16px; line-height: 22px; }
body .tt-location-gate__search-wrap input { height: 44px; min-height: 44px; border-radius: 10px; background: #0f1113; border-color: #34383e; }
body .tt-location-gate__search-wrap input:focus { background: #17191c; border-color: #8a929e; }
body .tt-location-gate__search-wrap > i, body .tt-location-gate__search-clear { top: 22px; }
body .tt-location-gate:not([hidden]) .tt-location-gate__card { animation: tt-location-enter .3s cubic-bezier(.2,.7,.2,1); }
@keyframes tt-location-enter { from { transform: translateY(100vh); } to { transform: translateY(0); } }
html.tt-dialog-desktop body .photo-media-modal-overlay { align-items: center; padding: 24px; }
html.tt-dialog-desktop body .photo-media-modal { max-width: 576px; border-radius: 20px; padding: 20px; }
html.tt-dialog-desktop body .photo-media-modal__handle { display: none; }
html.tt-dialog-desktop body .photo-media-modal__close { top: 10px; }
@media (prefers-reduced-motion: reduce) { body .tt-location-gate:not([hidden]) .tt-location-gate__card { animation: none; } }

body .photo-media-modal { background: #141414; border-color: rgba(255,255,255,.12); }
body .photo-media-modal__title { font-size: 18px; line-height: 24px; font-weight: 700; margin-inline: 44px; }
body .photo-media-modal__subtitle { font-size: 13px; line-height: 20px; margin-top: 8px; }
body .photo-media-modal__close { width: 44px; height: 44px; top: 10px; right: 12px; color: #9ca3af; }
body .photo-media-modal__close:hover { color: #e5e7eb; background: transparent; }
body .photo-media-modal__close:focus-visible { color: #e5e7eb; background: transparent; outline: 2px solid #9ca3af; outline-offset: -2px; }
body .photo-media-modal__close svg { width: 18px; height: 18px; }
body .photo-media-modal__options { border: 0; border-radius: 0; }
body .photo-media-modal__btn { min-height: 52px; padding: 14px 0; font-size: 14px; line-height: 20px; border-bottom-color: rgba(255,255,255,.05); }
body .photo-media-modal__btn:hover, body .photo-media-modal__btn:active { background: transparent; }
body .photo-media-modal__btn:focus-visible { background: rgba(255,255,255,.04); outline: 2px solid #9ca3af; outline-offset: -2px; }
body .photo-media-modal__btn .modal-icon { width: 20px; font-size: 20px; color: #9ca3af; }
body .fp2, body .filter-panel, body .tt-native-dialog, body .tt-location-gate__card, body .photo-media-modal { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
html:not(.tt-dialog-desktop) body .photo-media-modal-overlay { align-items: flex-end; padding: 0; }
html:not(.tt-dialog-desktop) body .photo-media-modal { max-width: none; max-height: calc(var(--app-height,100dvh) - 24px); border-radius: 20px 20px 0 0; padding: 14px 20px max(24px,env(safe-area-inset-bottom)); }
html:not(.tt-dialog-desktop) body .photo-media-modal__handle { display: block; width: 40px; height: 4px; margin: 0 auto 24px; border-radius: 2px; background: #6b7280; }
html:not(.tt-dialog-desktop) body .photo-media-modal__close { top: 30px; width: 44px; height: 44px; }
body .fp2__check-item:focus-visible { outline: 2px solid #9ca3af; outline-offset: 2px; }
/* Standalone iOS safe areas belong to the modal, outside its scrollable body. */
body .tt-native-dialog, body .fp2, body .filter-panel { padding-left: env(safe-area-inset-left,0px); padding-right: env(safe-area-inset-right,0px); }
body .tt-fullpage-mobile, body .filter-panel { padding-top: env(safe-area-inset-top,0px); }
html.tt-dialog-desktop body .tt-native-dialog, html.tt-dialog-desktop body .fp2, html.tt-dialog-desktop body .filter-panel {
    padding: 0;
    top: calc(var(--app-viewport-top,0px) + (var(--app-height,100dvh) + env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px)) / 2);
    max-height: calc(var(--app-height,100dvh) - 48px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
}
html.tt-dialog-desktop body .tt-fullpage-mobile, html.tt-dialog-desktop body .fp2, html.tt-dialog-desktop body .filter-panel {
    height: calc(var(--app-height,100dvh) - 48px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
}
body .tt-filter-date-dialog { --tt-modal-width: 400px; background: #1c1c1c; }
body .tt-filter-date-header { display: grid; grid-template-columns: 64px minmax(0,1fr) 64px; align-items: center; gap: 8px; min-height: 60px; padding: 8px 16px; border-bottom: 1px solid #2c2c2c; flex-shrink: 0; }
body .tt-filter-date-header h2 { margin: 0; text-align: center; font-size: 16px; font-weight: 600; }
body .tt-filter-date-header button { min-height: 44px; border: 0; background: transparent; font-size: 14px; color: #9ca3af; text-align: left; }
body .tt-filter-date-header [data-date-done] { color: #60a5fa; font-weight: 600; text-align: right; }
body .tt-filter-date-month { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px 0; flex-shrink: 0; }
body .tt-filter-date-month button { width: 44px; min-height: 44px; border: 0; background: transparent; color: #d1d5db; font-size: 24px; }
body .tt-filter-date-month span { font-size: 14px; font-weight: 600; }
body .tt-filter-date-body { min-height: 0; overflow-y: auto; padding: 8px 16px max(12px,env(safe-area-inset-bottom)); }
body .tt-filter-date-grid { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 2px; margin: 0; }
body .tt-filter-date-grid th { font-size: 12px; color: #9ca3af; text-align: center; padding: 4px 0; }
body .tt-filter-date-grid td { padding: 0; }
body .tt-filter-date-grid button { width: 100%; min-height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #d1d5db; font-size: 14px; }
body .tt-filter-date-grid button[aria-pressed=true] { background: #fff; color: #000; font-weight: 700; }
body .tt-filter-date-grid button:disabled { opacity: .25; }
body .tt-filter-date-dialog button:focus-visible { outline: 2px solid #9ca3af; outline-offset: -2px; }
body .filter-date-field:has(input[data-empty])::before { content: attr(data-date-placeholder); position: absolute; bottom: 12px; left: 12px; color: #9ca3af; font-size: 13px; pointer-events: none; }
body .filter-date-field input[data-empty]::-webkit-datetime-edit { color: transparent; }
body .fp2__check-item.is-last-visible { border-bottom: 0; }
body .filter-date-field input[readonly] { cursor: pointer; }
body .mkt-category-sheet__options::-webkit-scrollbar { display: block; width: 4px; }
body .mkt-category-sheet__options::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 2px; }
html:not(.tt-dialog-desktop) body .tt-filter-date-header button { font-size: 16px; }
@supports (-webkit-touch-callout: none) { body .filter-date-field:has(input[data-empty])::before { font-size: 16px; } }
