﻿/*
 * Senfesh 2.0.39
 * Front workspace secondary header + global light/dark theme completion.
 * Scope: front-end only. Admin theme remains independent.
 */

.account-workspace-secondary-shell {
    position: sticky;
    top: 0;
    z-index: 1450;
    width: 100%;
    padding: 10px max(14px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid rgba(34, 60, 119, .08);
    background: rgba(248, 249, 252, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.account-workspace-secondary-shell .senfesh-secondary-header {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

/*
 * Account/store pages historically rendered their own header rows.
 * The shared layout header is now the single source of truth in this workspace.
 */
body.has-account-workspace-secondary-header
.senfesh-main-content
.senfesh-secondary-header,
body.has-account-workspace-secondary-header
.senfesh-main-content
.account-standard-hero-row {
    display: none !important;
}

body.has-account-workspace-secondary-header
.account-standard-page {
    margin-top: 16px;
}

.account-theme-control {
    margin: 12px 0;
}

.account-theme-toggle {
    display: grid;
    width: 100%;
    grid-template-columns: 38px minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: center;
    min-height: 58px;
    padding: 9px 11px;
    border: 1px solid rgb(238, 240, 245);
    border-radius: 14px;
    color: rgb(25, 28, 38);
    background: #ffffff;
    font: inherit;
    text-align: right;
    cursor: pointer;
    transition:
        border-color .18s ease,
        background-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease;
}

.account-theme-toggle:hover,
.account-theme-toggle:focus-visible {
    border-color: rgba(34, 60, 119, .28);
    box-shadow: 0 8px 24px rgba(23, 37, 74, .06);
    outline: none;
}

.account-theme-toggle:active {
    transform: translateY(1px);
}

.account-theme-toggle__icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    color: rgb(34, 60, 119);
    background: rgba(34, 60, 119, .08);
}

.account-theme-toggle__icon svg {
    width: 21px;
    height: 21px;
}

.account-theme-toggle__moon {
    display: none;
}

.account-theme-toggle__copy {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.account-theme-toggle__copy strong {
    color: inherit;
    font-size: .88rem;
    font-weight: 900;
}

.account-theme-toggle__copy small {
    color: rgb(107, 114, 128);
    font-size: .72rem;
    font-weight: 700;
}

.account-theme-toggle__switch {
    position: relative;
    display: block;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: rgb(226, 232, 240);
    transition: background-color .18s ease;
}

.account-theme-toggle__switch i {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(23, 37, 74, .16);
    transition: transform .18s ease;
}

html[data-theme="dark"] .account-theme-toggle__sun {
    display: none;
}

html[data-theme="dark"] .account-theme-toggle__moon {
    display: block;
}

html[data-theme="dark"] .account-theme-toggle__switch {
    background: rgb(255, 160, 0);
}

html[data-theme="dark"] .account-theme-toggle__switch i {
    transform: translateX(-18px);
}

/*
 * Senfesh 2.0.41
 * Unified front dark-surface system.
 * This layer intentionally replaces page-by-page dark patches.
 */
html[data-theme="dark"] {
    color-scheme: dark;

    --tp-page-bg: #101112;
    --tp-surface: #101112;
    --tp-control: #191b1f;
    --tp-control-hover: #202328;
    --tp-overlay: #17191d;
    --tp-border: rgba(255, 255, 255, .11);
    --tp-border-strong: rgba(255, 255, 255, .19);
    --tp-text: #f5f6f7;
    --tp-muted: #b9bec6;
    --tp-subtle: #8f969f;
    --tp-accent: #ffa000;
    --tp-accent-hover: #ffb126;

    /*
     * Dark-mode emphasis is intentionally orange project-wide.
     * Legacy front code that still references primary variables therefore
     * resolves to the official orange without changing light-mode branding.
     */
    --tp-primary: var(--tp-accent);
    --tp-primary-dark: var(--tp-accent-hover);
    --senfesh-primary: var(--tp-accent);
    --senfesh-primary-hover: var(--tp-accent-hover);

    --tp-danger: #ff8d8d;
    --tp-success: #86d8a0;
    --tp-warning: #ffd176;
    --tp-shadow: none;

    --senfesh-background: var(--tp-page-bg);
    --senfesh-surface: var(--tp-surface);
    --senfesh-text: var(--tp-text);
    --senfesh-muted: var(--tp-muted);
    --senfesh-border: var(--tp-border);

    --bs-body-color: #f5f6f7;
    --bs-body-color-rgb: 245, 246, 247;
    --bs-body-bg: #101112;
    --bs-body-bg-rgb: 16, 17, 18;
    --bs-emphasis-color: #ffffff;
    --bs-secondary-color: #b9bec6;
    --bs-secondary-bg: #191b1f;
    --bs-tertiary-bg: #202328;
    --bs-border-color: rgba(255, 255, 255, .11);
    --bs-border-color-translucent: rgba(255, 255, 255, .10);
    --bs-link-color: #f1f3f5;
    --bs-link-hover-color: #ffb126;
    --bs-primary: #ffa000;
    --bs-primary-rgb: 255, 160, 0;
}

html[data-theme="dark"] body.senfesh-front-shell,
html[data-theme="dark"] body.senfesh-front-shell .senfesh-main-content {
    color: var(--tp-text) !important;
    background: var(--tp-page-bg) !important;
}

/* Shared navigation uses the same page surface instead of navy layers. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .senfesh-market-header,
    .senfesh-simple-header,
    .senfesh-market-footer,
    .senfesh-simple-footer,
    .account-workspace-secondary-shell,
    .senfesh-mobile-bottom-nav,
    .mobile-bottom-navigation,
    .mobile-market-header,
    .mobile-market-tools
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: rgba(16, 17, 18, .96) !important;
    box-shadow: none !important;
}

/*
 * Surface reset:
 * Every currently known front component that paints a white/light background
 * is flattened onto the common dark page background.
 */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .account-empty-tab-page,
    .account-fixed-action-bar,
    .account-payments-content,
    .account-theme-toggle,
    .account-theme-toggle__switch,
    .ad-description-card,
    .ad-gallery-card,
    .ad-gallery-thumbnails,
    .ad-icon-action,
    .ad-main-card,
    .ad-section-card,
    .ad-seller-card,
    .ad-type-option-body,
    .ad-wizard-actions,
    .ad-wizard-form,
    .ad-wizard-progress,
    .ad-wizard-tariff,
    .ads-desktop-sidebar,
    .ads-filter-bar,
    .advertisement-contact-option,
    .advertisement-contact-sheet__close,
    .advertisement-contact-sheet__panel,
    .advertisement-created-card,
    .advertisement-details-desktop__gallery-empty,
    .advertisement-details-desktop__gallery-frame,
    .advertisement-details-desktop__map,
    .advertisement-details-desktop__thumbnail,
    .advertisement-mobile-contact-bar,
    .advertisement-mobile-contact-bar__button--contact,
    .advertisement-owner-identity-card,
    .advertisement-store-card__avatar,
    .advertisement-tracking-code,
    .analytics-bar-track,
    .analytics-card,
    .analytics-empty,
    .analytics-filter-card,
    .appearance-device-switch,
    .appearance-fixed-link,
    .appearance-form-toolbar,
    .appearance-identity-card,
    .appearance-navigation-item,
    .appearance-section-panel,
    .appearance-section-switch,
    .appearance-settings-group,
    .appearance-toggle-grid,
    .browse-city-item,
    .browse-location-actions,
    .browse-location-all-iran,
    .browse-location-body,
    .browse-location-button,
    .browse-location-card,
    .browse-location-chip,
    .browse-location-chips,
    .browse-location-clear,
    .browse-location-header,
    .browse-location-list,
    .browse-location-search,
    .browse-location-stage,
    .browse-location-stage__back,
    .browse-location-stage__step,
    .browse-province-row,
    .business-branding-form,
    .business-branding-preview,
    .business-directory-card,
    .business-directory-card__logo,
    .business-directory-empty,
    .business-directory-filter,
    .business-directory-hero,
    .business-directory-page,
    .business-follower-card,
    .business-follower-card__call,
    .business-followers-empty,
    .business-followers-summary,
    .business-foundation-form,
    .business-foundation-note,
    .business-foundation-status,
    .category-live-loading,
    .category-picker-option,
    .category-picker-panel-header,
    .category-picker-progress-item,
    .category-public-ad-card,
    .category-public-ad-card__image,
    .category-public-children__grid,
    .category-public-header,
    .chat-bubble,
    .chat-thread,
    .choice-grid,
    .conversation-header-card,
    .conversation-list-item,
    .credential-item,
    .credential-item__meta,
    .credential-review-note,
    .credential-selected-help,
    .credential-status,
    .credential-steps,
    .credential-upload-summary,
    .development-otp-box,
    .divar-mobile-card,
    .edit-media-card,
    .edit-section,
    .employment-payment-plan,
    .empty-panel,
    .faq-empty,
    .faq-item,
    .favorite-card,
    .form-card,
    .identity-v2-alert,
    .identity-v2-card,
    .identity-v2-fee-card,
    .identity-v2-field,
    .identity-v2-paper,
    .identity-v2-process,
    .identity-v2-readonly-value,
    .identity-v2-review-note,
    .identity-v2-secondary-button,
    .identity-v2-selfie-guide,
    .identity-v2-status,
    .identity-v2-trust-card,
    .location-picker-card,
    .market-ad-card,
    .market-category-link,
    .market-category-list,
    .market-empty,
    .market-product-filter__check,
    .market-product-filter__form,
    .market-search,
    .market-sidebar,
    .market-switch-filter__track,
    .market-unified-filter-actions,
    .mobile-advertisement-map,
    .mobile-advertisement-media,
    .mobile-advertisement-media__frame,
    .mobile-advertisement-media__indicators,
    .mobile-bottom-navigation,
    .mobile-business-filter-option,
    .mobile-market-header,
    .mobile-market-sheet__close,
    .mobile-market-sheet__head,
    .mobile-market-tools,
    .mobile-search-form,
    .preferred-city-result,
    .preferred-city-results,
    .product-delivery-options,
    .province-all-row,
    .smart-back-button,
    .store-ajax-toast,
    .store-branch-map-picker,
    .store-card,
    .store-delivery-editor,
    .store-delivery-free,
    .store-document-row,
    .store-form,
    .store-item,
    .store-item-title,
    .store-management-badges,
    .store-management-header,
    .store-management-link,
    .store-readonly,
    .store-working-copy-day,
    .store-working-copy-panel,
    .store-working-copy-panel__close,
    .store-working-day,
    .store-working-hours-form,
    .storefront-action,
    .storefront-action--follow-preview,
    .storefront-avatar,
    .storefront-badge-strip,
    .storefront-bottom-actions,
    .storefront-bottom-actions__button,
    .storefront-bottom-actions__button--chat,
    .storefront-branch-address,
    .storefront-branch-grid,
    .storefront-branch-map-row,
    .storefront-branch-schedule,
    .storefront-branch-schedule__day,
    .storefront-brand-avatar,
    .storefront-brand-grid,
    .storefront-card,
    .storefront-card__caption,
    .storefront-card__media,
    .storefront-card__placeholder,
    .storefront-categories,
    .storefront-contact-chip,
    .storefront-contact-grid,
    .storefront-contact-sheet__close,
    .storefront-contact-sheet__option,
    .storefront-contact-sheet__panel,
    .storefront-delivery-card,
    .storefront-delivery-cost,
    .storefront-mobile-avatar,
    .storefront-mobile-media-row,
    .storefront-pagination,
    .storefront-profile,
    .storefront-profile-contact,
    .storefront-profile-link,
    .storefront-review-card,
    .storefront-review-compose-button,
    .storefront-review-editor,
    .storefront-review-empty,
    .storefront-review-field,
    .storefront-review-rating-clear,
    .storefront-search__field,
    .storefront-section,
    .storefront-source-ad,
    .storefront-tabs,
    .subscription-current,
    .subscription-history,
    .subscription-plan-card,
    .support-empty,
    .support-form,
    .support-ticket-card,
    .support-ticket-card__meta,
    .senfesh-mobile-bottom-nav__icon,
    .senfesh-mobile-bottom-nav__item,
    .team-card,
    .team-permission-tags,
    .team-permissions,
    .ticket-attachment,
    .ticket-details__badges,
    .ticket-details__meta,
    .ticket-message,
    .ticket-reply,
    .tp-back-button,
    .trust-account-identity,
    .trust-requirement-strip,
    .wizard-category-card,
    .wizard-checkbox-grid,
    .wizard-contact-options,
    .wizard-custom-attributes,
    .wizard-final-note,
    .wizard-free-tariff,
    .wizard-inline-option,
    .wizard-location-panel,
    .wizard-location-visibility,
    .wizard-video-primary
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Generic Bootstrap/front containers follow the same flat rule. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .card,
    .list-group-item,
    .accordion-item,
    .accordion-button,
    .table,
    .table > :not(caption) > * > *,
    .bg-white,
    .bg-light
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Typography: never use dark navy/blue text on the dark page. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    h1, h2, h3, h4, h5, h6,
    label, legend, summary,
    strong, b, th, td,
    .form-label,
    .page-heading-simple,
    .market-ad-body,
    .market-ad-price,
    .storefront-section__heading,
    .store-card-heading,
    .team-card
) {
    color: var(--tp-text) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    p, small, time,
    .text-muted,
    .form-text,
    .market-ad-category,
    .market-ad-meta
) {
    color: var(--tp-muted) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
a:not(.btn):not(.text-danger):not(.text-success):not(.text-warning) {
    color: #eef1f4 !important;
}

html[data-theme="dark"] body.senfesh-front-shell
a:not(.btn):hover {
    color: var(--tp-accent-hover) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(.text-primary, .link-primary) {
    color: var(--tp-accent) !important;
}

html[data-theme="dark"] body.senfesh-front-shell .text-danger {
    color: var(--tp-danger) !important;
}

html[data-theme="dark"] body.senfesh-front-shell .text-success {
    color: var(--tp-success) !important;
}

html[data-theme="dark"] body.senfesh-front-shell .text-warning {
    color: var(--tp-warning) !important;
}

/* Inputs remain the only ordinary elements with a distinct filled surface. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .form-control,
    .form-select,
    .input-group-text,
    textarea,
    select,
    input[type="text"],
    input[type="search"],
    input[type="tel"],
    input[type="email"],
    input[type="number"],
    input[type="url"],
    input[type="date"],
    input[type="time"],
    input[type="password"]
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border-strong) !important;
    background-color: var(--tp-control) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(input, textarea)::placeholder {
    color: var(--tp-subtle) !important;
    opacity: 1 !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(.form-control, .form-select, textarea, input):focus {
    color: var(--tp-text) !important;
    border-color: rgba(255, 160, 0, .62) !important;
    background-color: var(--tp-control-hover) !important;
    box-shadow: 0 0 0 .18rem rgba(255, 160, 0, .12) !important;
}

html[data-theme="dark"] body.senfesh-front-shell select,
html[data-theme="dark"] body.senfesh-front-shell option {
    color: var(--tp-text) !important;
    background: var(--tp-control) !important;
}

/* Default buttons are flat; the main action uses project orange. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .btn,
    button:not(.btn-primary):not(.btn-success):not(.btn-danger)
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border-strong) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .btn:hover,
    button:not(.btn-primary):not(.btn-success):not(.btn-danger):hover,
    .btn:focus-visible,
    button:not(.btn-primary):not(.btn-success):not(.btn-danger):focus-visible
) {
    color: #ffffff !important;
    border-color: rgba(255, 160, 0, .40) !important;
    background: rgba(255, 255, 255, .045) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(.btn-primary, .senfesh-market-header__create, .mobile-create-ad) {
    color: #171717 !important;
    border-color: var(--tp-accent) !important;
    background: var(--tp-accent) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(.btn-primary, .senfesh-market-header__create, .mobile-create-ad):hover {
    color: #111111 !important;
    border-color: var(--tp-accent-hover) !important;
    background: var(--tp-accent-hover) !important;
}

/* Active navigation/tabs use orange text instead of dark blue fills. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .is-active,
    .active,
    [aria-selected="true"],
    .senfesh-mobile-bottom-nav__item.is-active,
    .mobile-bottom-navigation a.is-active,
    .storefront-tabs button.is-active
) {
    color: var(--tp-accent) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .senfesh-secondary-header__title,
    .senfesh-secondary-header__back,
    .senfesh-secondary-header__action,
    .senfesh-header-button,
    .account-theme-toggle,
    .account-theme-toggle__icon,
    .store-accordion-toggle,
    .store-management-back
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Interactive icons inherit readable text color, never navy on black. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    button,
    a,
    [role="button"],
    .senfesh-header-button,
    .senfesh-secondary-header__back,
    .senfesh-mobile-bottom-nav__item
) svg {
    color: currentColor !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    button,
    a,
    [role="button"]
) svg path[stroke],
html[data-theme="dark"] body.senfesh-front-shell
:is(
    button,
    a,
    [role="button"]
) svg line,
html[data-theme="dark"] body.senfesh-front-shell
:is(
    button,
    a,
    [role="button"]
) svg polyline {
    stroke: currentColor !important;
}

/* Media placeholders get one subtle control surface; real images stay untouched. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .market-ad-image,
    .favorite-image,
    .favorite-market-card__image-link,
    .conversation-ad-image,
    .business-directory-card__logo,
    .category-public-ad-card__image,
    .advertisement-details-desktop__gallery-empty,
    .advertisement-details-desktop__gallery-frame,
    .advertisement-details-desktop__thumbnail,
    .mobile-advertisement-media__frame,
    .storefront-card__placeholder,
    .storefront-brand-avatar,
    .storefront-avatar,
    .storefront-mobile-avatar
) {
    color: var(--tp-muted) !important;
    border-color: var(--tp-border) !important;
    background: var(--tp-control) !important;
}

/* Dialogs, dropdowns and sheets need a distinct opaque layer. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .modal-content,
    .dropdown-menu,
    .offcanvas,
    .advertisement-contact-sheet__panel,
    .storefront-contact-sheet__panel,
    .mobile-market-sheet,
    .mobile-market-sheet__panel,
    .preferred-city-sheet,
    .preferred-city-panel,
    .store-working-copy-panel,
    .store-ajax-toast
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border-strong) !important;
    background: var(--tp-overlay) !important;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .42) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .dropdown-item,
    .advertisement-contact-option,
    .storefront-contact-sheet__option,
    .preferred-city-result
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: transparent !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .dropdown-item:hover,
    .advertisement-contact-option:hover,
    .storefront-contact-sheet__option:hover,
    .preferred-city-result:hover
) {
    color: #ffffff !important;
    background: rgba(255, 255, 255, .05) !important;
}

/* Fixed action areas are opaque for readability but still neutral, never white/navy. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .account-fixed-action-bar,
    .appearance-form-toolbar,
    .market-unified-filter-actions,
    .advertisement-mobile-contact-bar,
    .storefront-bottom-actions
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: rgba(16, 17, 18, .96) !important;
    box-shadow: 0 -10px 32px rgba(0, 0, 0, .26) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* Storefront bottom actions: equal side spacing on every viewport. */
.storefront-bottom-actions {
    padding-inline: max(10px, env(safe-area-inset-left)) !important;
}

.storefront-bottom-actions__inner {
    width: min(100%, 1180px) !important;
    max-width: 1180px !important;
    margin-inline: auto !important;
    gap: 10px !important;
}

.storefront-bottom-actions__form,
.storefront-bottom-actions__button {
    min-width: 0 !important;
    margin: 0 !important;
}

.storefront-bottom-actions__button {
    width: 100% !important;
}

/* Status/notice colors remain semantic but use very low surface fill. */
html[data-theme="dark"] body.senfesh-front-shell
:is(.alert-success, .is-success, .status-approved) {
    color: var(--tp-success) !important;
    border-color: rgba(134, 216, 160, .28) !important;
    background: rgba(134, 216, 160, .06) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(.alert-danger, .is-error, .status-rejected) {
    color: var(--tp-danger) !important;
    border-color: rgba(255, 141, 141, .28) !important;
    background: rgba(255, 141, 141, .06) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(.alert-warning, .status-pending) {
    color: var(--tp-warning) !important;
    border-color: rgba(255, 209, 118, .28) !important;
    background: rgba(255, 209, 118, .06) !important;
}

/* Chat remains visually understandable without white bubbles. */
html[data-theme="dark"] .chat-thread {
    background: transparent !important;
}

html[data-theme="dark"] .chat-bubble.mine {
    color: var(--tp-text) !important;
    border: 1px solid rgba(255, 160, 0, .18) !important;
    background: rgba(255, 160, 0, .055) !important;
}

html[data-theme="dark"] .chat-bubble.theirs {
    color: var(--tp-text) !important;
    border: 1px solid var(--tp-border) !important;
    background: rgba(255, 255, 255, .035) !important;
}

/* Maps: use a neutral dark visual treatment without changing map data/provider. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .storefront-branch-map-row,
    .store-branch-map,
    .wizard-map,
    .ad-map,
    .advertisement-details-desktop__map,
    .mobile-advertisement-map
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: #151719 !important;
}

html[data-theme="dark"] .storefront-branch-map-row iframe {
    filter:
        grayscale(.35)
        invert(.92)
        hue-rotate(180deg)
        brightness(.78)
        contrast(.90) !important;
}

html[data-theme="dark"] .leaflet-container {
    background: #151719 !important;
}

html[data-theme="dark"] .leaflet-tile-pane .leaflet-tile {
    filter:
        grayscale(.40)
        invert(.92)
        hue-rotate(180deg)
        brightness(.76)
        contrast(.90) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .leaflet-control-zoom a,
    .leaflet-control-attribution,
    .leaflet-popup-content-wrapper,
    .leaflet-popup-tip
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: var(--tp-overlay) !important;
}

/* Favorites use a compact, bounded image like the home listing language. */
.favorite-market-card {
    display: grid !important;
    grid-template-columns: 116px minmax(0, 1fr) !important;
    min-height: 138px !important;
    overflow: hidden !important;
}

.favorite-market-card__image-link {
    width: 96px !important;
    height: 96px !important;
    min-width: 96px !important;
    min-height: 96px !important;
    max-width: 96px !important;
    max-height: 96px !important;
    align-self: start !important;
    justify-self: center !important;
    margin: 10px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.favorite-market-card__image-link img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
}

.favorite-market-card__body {
    min-width: 0 !important;
    padding: 10px !important;
    background: transparent !important;
}

/* Switches use neutral gray + orange when active. */
html[data-theme="dark"] .account-theme-toggle__switch,
html[data-theme="dark"] .market-switch-filter__track {
    background: #373b41 !important;
}

html[data-theme="dark"] .account-theme-toggle__switch {
    border: 1px solid var(--tp-border-strong);
}

html[data-theme="dark"] .account-theme-toggle__switch i {
    background: #f5f6f7 !important;
}

html[data-theme="dark"] .market-switch-filter input:checked + .market-switch-filter__track,
html[data-theme="dark"] .form-check-input:checked {
    border-color: var(--tp-accent) !important;
    background-color: var(--tp-accent) !important;
}


/* Remove remaining navy/blue painted surfaces from dark mode. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .site-notice,
    .wallet-balance-card,
    .account-standard-hero-text,
    .account-profile-hero-text,
    .account-payments-hero-text,
    .account-ads-hero-text,
    .account-dashboard-heading__visual-text,
    .support-page__hero-text,
    .faq-heading__title,
    .business-foundation-note,
    .business-branding-cover,
    .subscription-current,
    .advertisement-store-card,
    .storefront-review-overview,
    .identity-v2-page,
    .identity-v2-selfie-visual,
    .ad-image-uploader__dropzone,
    .market-followed-businesses-section,
    .market-followed-businesses-filter
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .account-profile-avatar,
    .business-branding-logo,
    .ad-seller-avatar,
    .advertisement-store-card__avatar,
    .identity-v2-trust-icon,
    .identity-v2-upload-icon,
    .identity-v2-file-action,
    .advertisement-contact-option__icon,
    .storefront-contact-sheet__icon,
    .storefront-contact-chip svg,
    .storefront-profile-contact svg,
    .storefront-delivery-card__icon,
    .storefront-branch-title span,
    .store-management-link__arrow,
    .store-badge
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: var(--tp-control) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .market-search button,
    .market-post-ad,
    .ads-filter-bar button,
    .ads-create-button,
    .ad-primary-action,
    .chat-compose button,
    .business-directory-filter button,
    .advertisement-mobile-contact-bar__button--chat,
    .advertisement-store-card__button,
    .identity-v2-primary-button,
    .ad-image-uploader__button,
    .configurable-header-search button,
    .mobile-configurable-search button
) {
    color: #171717 !important;
    border-color: var(--tp-accent) !important;
    background: var(--tp-accent) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .market-search button,
    .market-post-ad,
    .ads-filter-bar button,
    .ads-create-button,
    .ad-primary-action,
    .chat-compose button,
    .business-directory-filter button,
    .advertisement-mobile-contact-bar__button--chat,
    .advertisement-store-card__button,
    .identity-v2-primary-button,
    .ad-image-uploader__button,
    .configurable-header-search button,
    .mobile-configurable-search button
):hover {
    color: #111111 !important;
    border-color: var(--tp-accent-hover) !important;
    background: var(--tp-accent-hover) !important;
}

html[data-theme="dark"] .storefront-cover,
html[data-theme="dark"] .storefront-mobile-cover {
    background:
        linear-gradient(
            135deg,
            #1a1c1f,
            #22262b 65%,
            rgba(255, 160, 0, .16)
        ) !important;
}

html[data-theme="dark"] .storefront-cover__shade,
html[data-theme="dark"] .storefront-mobile-cover__shade {
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, .02),
            rgba(0, 0, 0, .34)
        ) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .store-map-locate,
    .store-working-day__copy,
    .store-accordion-toggle,
    .store-management-back,
    .account-tab-back-button,
    .account-tab-inline-back-button,
    .senfesh-secondary-header__back,
    .senfesh-secondary-header__action,
    .mobile-business-directory-link,
    .storefront-action--follow
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border-strong) !important;
    background: transparent !important;
}

html[data-theme="dark"] .trust-progress-track span,
html[data-theme="dark"] .analytics-bar-track span {
    background: var(--tp-accent) !important;
}

/* Keyboard focus is visible everywhere. */
html[data-theme="dark"] body.senfesh-front-shell
:is(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid rgba(255, 160, 0, .76) !important;
    outline-offset: 2px !important;
}

@media (max-width: 767px) {
    .favorite-market-card {
        grid-template-columns: 96px minmax(0, 1fr) !important;
        min-height: 118px !important;
    }

    .favorite-market-card__image-link {
        width: 80px !important;
        height: 80px !important;
        min-width: 80px !important;
        min-height: 80px !important;
        max-width: 80px !important;
        max-height: 80px !important;
        margin: 8px !important;
    }

    .favorite-market-card__body {
        gap: 6px !important;
        padding: 8px 8px 8px 4px !important;
    }

    .favorite-market-card__content {
        gap: 4px !important;
    }

    .favorite-market-card__remove {
        min-height: 36px !important;
        padding: 5px 8px !important;
    }

    .storefront-bottom-actions__inner {
        gap: 8px !important;
    }
}

/* Senfesh 2.0.41-fixed.1 - business page root dark background fix */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .storefront-page,
    .business-directory-page,
    .account-standard-page
) {
    color: var(--tp-text) !important;
    background: var(--tp-page-bg) !important;
}

html[data-theme="dark"] body.senfesh-front-shell .storefront-page {
    --store-bg: var(--tp-page-bg) !important;
    --store-text: var(--tp-text) !important;
    --store-muted: var(--tp-muted) !important;
    --store-border: var(--tp-border) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .storefront-container,
    .business-directory-container,
    .account-standard-content,
    .storefront-main,
    .storefront-grid
) {
    background: transparent !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .storefront-profile,
    .storefront-section,
    .storefront-source-ad,
    .storefront-tabs,
    .storefront-badge-strip,
    .business-directory-hero,
    .business-directory-filter,
    .business-directory-card,
    .business-directory-empty,
    .business-foundation-note,
    .business-foundation-status,
    .business-foundation-form,
    .business-branding-form,
    .business-branding-preview
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/*
 * Senfesh 2.0.41-fixed.2
 * Final full-front dark cleanup.
 * Design rule: dark mode uses one shared page background. Ordinary cards,
 * fields, pills and informational blocks do not paint white/light surfaces.
 * Only overlays/maps and the primary action retain a distinct surface.
 */
html[data-theme="dark"] {
    --tp-page-bg: #101112;
    --tp-surface: #101112;
    --tp-control: transparent;
    --tp-control-hover: rgba(255, 255, 255, .035);
    --tp-overlay: #17191d;
}

/* Use the root dark background for all normal form controls. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .form-control,
    .form-select,
    .form-control:disabled,
    .form-control[readonly],
    .form-select:disabled,
    .input-group-text,
    textarea,
    select,
    input[type="text"],
    input[type="search"],
    input[type="tel"],
    input[type="email"],
    input[type="number"],
    input[type="url"],
    input[type="date"],
    input[type="time"],
    input[type="password"],
    input[type="file"]
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border-strong) !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(.form-control, .form-select, textarea, select, input):focus {
    color: var(--tp-text) !important;
    border-color: rgba(255, 160, 0, .72) !important;
    background-color: transparent !important;
    box-shadow: 0 0 0 .14rem rgba(255, 160, 0, .10) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
input[type="file"]::file-selector-button {
    color: var(--tp-text) !important;
    border: 0 !important;
    border-inline-end: 1px solid var(--tp-border) !important;
    background: transparent !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    input[type="checkbox"],
    input[type="radio"],
    .form-check-input
) {
    border-color: var(--tp-border-strong) !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    input[type="checkbox"],
    input[type="radio"],
    .form-check-input
):checked {
    border-color: var(--tp-accent) !important;
    background-color: var(--tp-accent) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(select, option) {
    color: var(--tp-text) !important;
}

html[data-theme="dark"] body.senfesh-front-shell option {
    background: #17191d !important;
}

/* Browser autofill must not re-introduce a bright field. */
html[data-theme="dark"] body.senfesh-front-shell
input:-webkit-autofill,
html[data-theme="dark"] body.senfesh-front-shell
input:-webkit-autofill:hover,
html[data-theme="dark"] body.senfesh-front-shell
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--tp-text) !important;
    caret-color: var(--tp-text) !important;
    box-shadow: 0 0 0 1000px var(--tp-page-bg) inset !important;
    transition: background-color 9999s ease-out 0s;
}

/*
 * Broad flat-surface rule.
 * These naming families are ordinary content surfaces throughout the front.
 * Overlays, media, maps and primary actions are intentionally handled later.
 */
html[data-theme="dark"] body.senfesh-front-shell
.senfesh-main-content
:where(
    [class$="-card"],
    [class*="-card "],
    [class$="-panel"],
    [class*="-panel "],
    [class$="-box"],
    [class*="-box "],
    [class$="-chip"],
    [class*="-chip "],
    [class$="-pill"],
    [class*="-pill "]
):not(
    [class*="map"]
):not(
    [class*="media"]
):not(
    [class*="image"]
):not(
    [class*="avatar"]
):not(
    [class*="cover"]
):not(
    [class*="sheet"]
):not(
    [class*="modal"]
):not(
    [class*="dialog"]
):not(
    [class*="toast"]
) {
    border-color: var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Storefront: branches and all of their light sub-surfaces are flattened. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .storefront-branch-card,
    .storefront-branch-address,
    .storefront-branch-schedule,
    .storefront-branch-schedule__day,
    .storefront-branch-schedule__day.is-closed,
    .storefront-branch-contacts,
    .storefront-info-empty
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .storefront-branch-title strong,
    .storefront-branch-address,
    .storefront-branch-schedule__title strong,
    .storefront-branch-schedule__day span,
    .storefront-branch-schedule__day b
) {
    color: var(--tp-text) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.storefront-branch-schedule__day.is-closed b {
    color: var(--tp-danger) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .storefront-branch-address svg,
    .storefront-branch-map-row--empty > svg
) {
    color: var(--tp-text) !important;
    stroke: currentColor !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.storefront-branch-map-row a {
    color: var(--tp-text) !important;
    border-color: var(--tp-border-strong) !important;
    background: rgba(16, 17, 18, .88) !important;
    box-shadow: none !important;
}

/* Storefront category pills: no white oval backgrounds. */
html[data-theme="dark"] body.senfesh-front-shell
.storefront-categories a {
    color: var(--tp-muted) !important;
    border-color: var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.storefront-categories a:hover {
    color: var(--tp-text) !important;
    border-color: var(--tp-border-strong) !important;
    background: transparent !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.storefront-categories a.is-active {
    color: var(--tp-accent) !important;
    border-color: rgba(255, 160, 0, .72) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.storefront-categories small {
    color: var(--tp-subtle) !important;
}

/* Team/access pills and permission rows never paint a light oval or panel. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .team-permissions,
    .team-permission-tags,
    .team-role-box,
    .team-check
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.team-permission-tags span,
html[data-theme="dark"] body.senfesh-front-shell
.badge.text-bg-light {
    color: var(--tp-muted) !important;
    border: 1px solid var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Ad creation: selected type is unmistakable in dark mode. */
html[data-theme="dark"] body.senfesh-front-shell
.ad-type-option-body {
    color: var(--tp-text) !important;
    border-color: var(--tp-border-strong) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.ad-type-option:hover .ad-type-option-body {
    border-color: rgba(255, 160, 0, .42) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.ad-type-option input:checked + .ad-type-option-body {
    color: var(--tp-text) !important;
    border: 2px solid var(--tp-accent) !important;
    background: rgba(255, 160, 0, .075) !important;
    box-shadow:
        0 0 0 1px rgba(255, 160, 0, .20),
        inset 0 0 0 1px rgba(255, 160, 0, .06) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.ad-type-option input:checked + .ad-type-option-body
.ad-type-option-title {
    color: var(--tp-accent) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.ad-type-option input:focus-visible + .ad-type-option-body {
    outline: 2px solid rgba(255, 160, 0, .86) !important;
    outline-offset: 3px !important;
}

/* Step 3: remove the light halo around specialized information. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .product-advertisement-panel,
    .employment-payment-plan,
    .product-delivery-options label,
    .wizard-video-primary,
    .wizard-inline-option,
    .wizard-location-panel,
    .wizard-location-visibility,
    .wizard-location-visibility-options label,
    .wizard-map-search,
    .category-picker-progress,
    .category-picker-panel,
    .category-picker-panel-header,
    .category-picker-option
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* The "محدوده" action follows the root background too. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .senfesh-market-header__location,
    .browse-location-card,
    .browse-location-stage,
    .browse-location-body,
    .browse-location-header,
    .browse-location-actions,
    .browse-location-list,
    .browse-location-chips,
    .browse-location-chip,
    .browse-city-item,
    .browse-province-row,
    .province-all-row,
    .preferred-city-results,
    .preferred-city-result
) {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Identity status inside advertisement cards: no bright chip, semantic text only. */
html[data-theme="dark"] body.senfesh-front-shell
.divar-mobile-identity {
    display: flex;
    width: fit-content;
    max-width: 100%;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    padding: 2px 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    color: var(--tp-muted) !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.divar-mobile-identity span {
    color: var(--tp-muted) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.divar-mobile-identity strong {
    font-weight: 900 !important;
    background: transparent !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.divar-mobile-identity.is-unverified strong {
    color: #ff7b7b !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.divar-mobile-identity.is-pending strong {
    color: #ffd166 !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.divar-mobile-identity.is-verified strong {
    color: #72d994 !important;
}

/* Favorites: price and delete share one row, so the action no longer adds height. */
.favorite-market-card {
    min-height: 112px !important;
}

.favorite-market-card__body {
    display: block !important;
}

.favorite-market-card__content {
    display: grid !important;
    gap: 4px !important;
}

.favorite-market-card__footer {
    display: flex !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-top: 2px !important;
}

.favorite-market-card__footer .market-ad-price {
    min-width: 0 !important;
    margin: 0 !important;
}

.favorite-market-card__action {
    flex: 0 0 auto !important;
    margin: 0 !important;
}

.favorite-market-card__remove {
    min-height: 28px !important;
    padding: 2px 8px !important;
    border-radius: 8px !important;
    font-size: .72rem !important;
    line-height: 1.4 !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.favorite-market-card__remove {
    color: var(--tp-danger) !important;
    border-color: rgba(255, 123, 123, .38) !important;
    background: transparent !important;
}

@media (max-width: 767px) {
    .favorite-market-card {
        grid-template-columns: 88px minmax(0, 1fr) !important;
        min-height: 96px !important;
    }

    .favorite-market-card__image-link {
        width: 72px !important;
        height: 72px !important;
        min-width: 72px !important;
        min-height: 72px !important;
        max-width: 72px !important;
        max-height: 72px !important;
        margin: 8px !important;
    }

    .favorite-market-card__body {
        padding: 7px 6px 7px 2px !important;
    }

    .favorite-market-card__remove {
        min-height: 26px !important;
        padding: 2px 7px !important;
        font-size: .68rem !important;
    }
}
/*
 * Senfesh 2.0.41-fixed.3
 * Ad details dark map + transparent range action + glass mobile navigation.
 * Snapshot: Senfesh-AdDetails-Map-Range-NavGlass-TargetSnapshot-20260814-191718
 */

/* Advertisement details maps are Google iframes, so dark mode must filter the iframe itself. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .mobile-advertisement-map,
    .advertisement-details-desktop__map
) {
    border-color: var(--tp-border) !important;
    background: #111315 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .mobile-advertisement-map iframe,
    .advertisement-details-desktop__map iframe
) {
    filter:
        grayscale(.28)
        invert(.92)
        hue-rotate(180deg)
        brightness(.76)
        contrast(.92) !important;
    opacity: .96;
}

/* Keep map labels/overlays readable after the map itself is darkened. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .mobile-advertisement-map__overlay,
    .advertisement-details-desktop__map-overlay,
    .advertisement-details-desktop__map-label
) {
    color: var(--tp-text) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.advertisement-details-desktop__map-label {
    border-color: rgba(255, 255, 255, .10) !important;
    background: rgba(16, 17, 18, .78) !important;
    box-shadow: none !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/*
 * "محدوده" is an action inside the marketplace header.
 * It must inherit the surrounding page/header instead of painting a white pill.
 */
body.senfesh-front-shell
.senfesh-market-header__location,
body.senfesh-front-shell
.senfesh-market-header__location:hover,
body.senfesh-front-shell
.senfesh-market-header__location:focus,
body.senfesh-front-shell
.senfesh-market-header__location:active {
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.senfesh-market-header__location {
    color: var(--tp-text) !important;
    border-color: var(--tp-border) !important;
}

/*
 * Mobile navigation: glass instead of an opaque painted background.
 * Individual navigation items stay transparent in both themes.
 */
body.senfesh-front-shell
:is(
    .senfesh-mobile-bottom-nav,
    .mobile-bottom-navigation
) {
    background: rgba(248, 249, 252, .62) !important;
    border-color: rgba(34, 60, 119, .10) !important;
    box-shadow: 0 -10px 34px rgba(23, 37, 74, .08) !important;
    backdrop-filter: blur(20px) saturate(155%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(155%) !important;
}

body.senfesh-front-shell
:is(
    .senfesh-mobile-bottom-nav__item,
    .mobile-bottom-navigation a
) {
    background: transparent !important;
    box-shadow: none !important;
}

body.senfesh-front-shell
:is(
    .senfesh-mobile-bottom-nav__item:hover,
    .senfesh-mobile-bottom-nav__item:focus-visible,
    .mobile-bottom-navigation a:hover,
    .mobile-bottom-navigation a:focus-visible
) {
    background: rgba(255, 255, 255, .24) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .senfesh-mobile-bottom-nav,
    .mobile-bottom-navigation
) {
    color: var(--tp-text) !important;
    border-color: rgba(255, 255, 255, .08) !important;
    background: rgba(16, 17, 18, .58) !important;
    box-shadow: 0 -12px 36px rgba(0, 0, 0, .24) !important;
    backdrop-filter: blur(20px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .senfesh-mobile-bottom-nav__item:hover,
    .senfesh-mobile-bottom-nav__item:focus-visible,
    .mobile-bottom-navigation a:hover,
    .mobile-bottom-navigation a:focus-visible
) {
    background: rgba(255, 255, 255, .045) !important;
}

/* Active item is indicated by color, not a filled capsule. */
body.senfesh-front-shell
:is(
    .senfesh-mobile-bottom-nav__item.is-active,
    .mobile-bottom-navigation a.is-active
) {
    background: transparent !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .senfesh-mobile-bottom-nav__item.is-active,
    .mobile-bottom-navigation a.is-active
) {
    color: var(--tp-accent) !important;
}
/*
 * Senfesh 2.0.41-fixed.4
 * Project-wide glass header standard.
 * Snapshot: Senfesh-ALL-Headers-GlassStandard-TargetSnapshot-20260814-192525
 *
 * Rule:
 * - Every primary/secondary/page header uses one translucent glass language.
 * - Light and dark modes use the same blur/border behavior with theme-safe opacity.
 * - Header controls remain readable and never paint an opaque white/navy block.
 */
body.senfesh-front-shell {
    --tp-glass-header-bg: rgba(255, 255, 255, .60);
    --tp-glass-header-bg-strong: rgba(255, 255, 255, .74);
    --tp-glass-header-item: rgba(255, 255, 255, .20);
    --tp-glass-header-item-hover: rgba(255, 255, 255, .40);
    --tp-glass-header-border: rgba(34, 60, 119, .10);
    --tp-glass-header-shadow: 0 10px 32px rgba(23, 37, 74, .08);
    --tp-glass-header-text: rgb(25, 28, 38);
    --tp-glass-header-muted: rgb(107, 114, 128);
}

html[data-theme="dark"] body.senfesh-front-shell {
    --tp-glass-header-bg: rgba(16, 17, 18, .56);
    --tp-glass-header-bg-strong: rgba(20, 22, 24, .70);
    --tp-glass-header-item: rgba(255, 255, 255, .035);
    --tp-glass-header-item-hover: rgba(255, 255, 255, .065);
    --tp-glass-header-border: rgba(255, 255, 255, .085);
    --tp-glass-header-shadow: 0 12px 36px rgba(0, 0, 0, .22);
    --tp-glass-header-text: var(--tp-text);
    --tp-glass-header-muted: var(--tp-muted);
}

/* Primary application headers. */
body.senfesh-front-shell
:is(
    .senfesh-market-header,
    .senfesh-simple-header,
    .site-header
) {
    color: var(--tp-glass-header-text) !important;
    border-color: var(--tp-glass-header-border) !important;
    background: var(--tp-glass-header-bg) !important;
    box-shadow: var(--tp-glass-header-shadow) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
}

/* Old Bootstrap navbar must not repaint an opaque block inside the glass header. */
body.senfesh-front-shell
.site-header .navbar {
    background: transparent !important;
    box-shadow: none !important;
}

/* Primary header controls use a subtle glass tint instead of opaque surfaces. */
body.senfesh-front-shell
:is(
    .senfesh-header-button,
    .senfesh-market-header__search input
) {
    color: var(--tp-glass-header-text) !important;
    border-color: var(--tp-glass-header-border) !important;
    background: var(--tp-glass-header-item) !important;
    box-shadow: none !important;
    backdrop-filter: blur(12px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(140%) !important;
}

body.senfesh-front-shell
:is(
    .senfesh-header-button:hover,
    .senfesh-header-button:focus-visible,
    .senfesh-market-header__search input:focus
) {
    border-color: var(--tp-glass-header-border) !important;
    background: var(--tp-glass-header-item-hover) !important;
}

/* Preserve the official create-ad action as the single strong CTA in the header. */
body.senfesh-front-shell
.senfesh-header-button.senfesh-market-header__create {
    color: #ffffff !important;
    border-color: var(--senfesh-primary) !important;
    background: var(--senfesh-primary) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.senfesh-header-button.senfesh-market-header__create {
    color: #111111 !important;
    border-color: var(--tp-accent) !important;
    background: var(--tp-accent) !important;
}

/*
 * Shared secondary-header shells.
 * Full-width sticky account shell keeps square outer edges;
 * content-level shells use a soft radius.
 */
body.senfesh-front-shell
.account-workspace-secondary-shell {
    color: var(--tp-glass-header-text) !important;
    border-color: var(--tp-glass-header-border) !important;
    background: var(--tp-glass-header-bg) !important;
    box-shadow: var(--tp-glass-header-shadow) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
}

body.senfesh-front-shell
:is(
    .store-secondary-header-shell,
    .storefront-secondary-header-shell,
    .advertisement-secondary-header-shell
) {
    padding: 6px !important;
    border: 1px solid var(--tp-glass-header-border) !important;
    border-radius: 18px !important;
    color: var(--tp-glass-header-text) !important;
    background: var(--tp-glass-header-bg) !important;
    box-shadow: var(--tp-glass-header-shadow) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
}

body.senfesh-front-shell
:is(
    .store-secondary-header-shell,
    .storefront-secondary-header-shell,
    .advertisement-secondary-header-shell
)
.senfesh-secondary-header {
    margin-bottom: 0 !important;
}

/* Shared secondary header pieces inherit the same glass language. */
body.senfesh-front-shell
:is(
    .senfesh-secondary-header__title,
    .senfesh-secondary-header__back,
    .senfesh-secondary-header__action
) {
    color: var(--tp-glass-header-text) !important;
    border-color: var(--tp-glass-header-border) !important;
    background: var(--tp-glass-header-item) !important;
    box-shadow: none !important;
    backdrop-filter: blur(14px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(14px) saturate(145%) !important;
}

body.senfesh-front-shell
.senfesh-secondary-header__title {
    background: var(--tp-glass-header-bg-strong) !important;
}

body.senfesh-front-shell
:is(
    .senfesh-secondary-header__back:hover,
    .senfesh-secondary-header__back:focus-visible,
    .senfesh-secondary-header__action:hover,
    .senfesh-secondary-header__action:focus-visible
) {
    color: var(--tp-glass-header-text) !important;
    border-color: var(--tp-glass-header-border) !important;
    background: var(--tp-glass-header-item-hover) !important;
}

/* Active secondary action keeps a clear accent without introducing navy-on-dark. */
body.senfesh-front-shell
.senfesh-secondary-header__action.is-active {
    color: #ffffff !important;
    border-color: var(--senfesh-primary) !important;
    background: var(--senfesh-primary) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.senfesh-secondary-header__action.is-active {
    color: #111111 !important;
    border-color: var(--tp-accent) !important;
    background: var(--tp-accent) !important;
}

/*
 * Page-level headers that historically owned their own white/solid background.
 * These are treated as glass header surfaces project-wide.
 */
body.senfesh-front-shell
:is(
    .browse-location-header,
    .category-picker-panel-header,
    .category-public-header,
    .business-directory-hero,
    .storefront-profile,
    .conversation-header-card,
    .trust-business-header,
    .store-management-header,
    .storefront-contact-sheet__header,
    .advertisement-contact-sheet__header,
    .modal-header
) {
    color: var(--tp-glass-header-text) !important;
    border-color: var(--tp-glass-header-border) !important;
    background: var(--tp-glass-header-bg) !important;
    box-shadow: var(--tp-glass-header-shadow) !important;
    backdrop-filter: blur(18px) saturate(145%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(145%) !important;
}

/* Text and icons inside glass headers always inherit a readable theme color. */
body.senfesh-front-shell
:is(
    .senfesh-market-header,
    .senfesh-simple-header,
    .senfesh-secondary-header,
    .browse-location-header,
    .category-picker-panel-header,
    .category-public-header,
    .business-directory-hero,
    .storefront-profile,
    .conversation-header-card,
    .trust-business-header,
    .store-management-header
)
:is(h1, h2, h3, strong, a, button, svg) {
    color: inherit;
}

/* Mobile navigation remains part of the same glass system. */
body.senfesh-front-shell
:is(
    .senfesh-mobile-bottom-nav,
    .mobile-bottom-navigation
) {
    color: var(--tp-glass-header-text) !important;
    border-color: var(--tp-glass-header-border) !important;
    background: var(--tp-glass-header-bg) !important;
    box-shadow: var(--tp-glass-header-shadow) !important;
    backdrop-filter: blur(20px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(150%) !important;
}

/* Fallback for browsers without backdrop-filter. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    body.senfesh-front-shell
    :is(
        .senfesh-market-header,
        .senfesh-simple-header,
        .site-header,
        .account-workspace-secondary-shell,
        .store-secondary-header-shell,
        .storefront-secondary-header-shell,
        .advertisement-secondary-header-shell,
        .browse-location-header,
        .category-picker-panel-header,
        .category-public-header,
        .conversation-header-card,
        .trust-business-header,
        .store-management-header,
        .storefront-contact-sheet__header,
        .advertisement-contact-sheet__header,
        .modal-header,
        .senfesh-mobile-bottom-nav,
        .mobile-bottom-navigation
    ) {
        background: var(--tp-glass-header-bg-strong) !important;
    }
}
/*
 * Senfesh 2.0.41-fixed.5
 * Strong mobile drawer blur + browse-location root/container guard.
 * Snapshot: Senfesh-MobileDrawers-Blur-RangeLayout-TargetSnapshot-20260814-194135
 */
@media (max-width: 991.98px) {
    body.senfesh-front-shell .mobile-market-sheet-backdrop {
        background: rgba(17, 24, 39, .34) !important;
        backdrop-filter: blur(24px) saturate(125%) !important;
        -webkit-backdrop-filter: blur(24px) saturate(125%) !important;
    }

    body.senfesh-front-shell .ads-desktop-sidebar.is-mobile-open {
        background: rgba(255, 255, 255, .90) !important;
        backdrop-filter: blur(30px) saturate(155%) !important;
        -webkit-backdrop-filter: blur(30px) saturate(155%) !important;
    }

    html[data-theme="dark"] body.senfesh-front-shell .mobile-market-sheet-backdrop {
        background: rgba(0, 0, 0, .58) !important;
        backdrop-filter: blur(26px) saturate(115%) !important;
        -webkit-backdrop-filter: blur(26px) saturate(115%) !important;
    }

    html[data-theme="dark"] body.senfesh-front-shell .ads-desktop-sidebar.is-mobile-open {
        background: rgba(16, 17, 18, .88) !important;
        backdrop-filter: blur(30px) saturate(145%) !important;
        -webkit-backdrop-filter: blur(30px) saturate(145%) !important;
    }
}

body.senfesh-front-shell .browse-location-page {
    background: var(--senfesh-background, rgb(248, 249, 252)) !important;
}

body.senfesh-front-shell .browse-location-shell {
    width: min(100%, 1180px) !important;
    max-width: 1180px !important;
    margin-inline: auto !important;
}

html[data-theme="dark"] body.senfesh-front-shell .browse-location-page {
    background: var(--tp-page-bg) !important;
}

/*
 * Senfesh 2.0.41-fixed.7
 * Fixed shared account/business secondary header.
 * Snapshot: Senfesh-StickySecondaryHeader-AdFixedActions-ContactSheet-TargetSnapshot-20260815-120042
 */
body.senfesh-front-shell.has-account-workspace-secondary-header
.account-workspace-secondary-shell {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 2147481000 !important;
    box-sizing: border-box !important;
    min-height: 72px;
    margin: 0 !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
.senfesh-main-content {
    padding-top: 72px;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
.account-workspace-secondary-shell
.senfesh-secondary-header {
    margin: 0 auto !important;
}

@media (max-width: 1199px) {
    body.senfesh-front-shell.has-account-workspace-secondary-header
    .account-workspace-secondary-shell {
        min-height: 64px;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    .senfesh-main-content {
        padding-top: 64px;
    }
}



/*
 * Senfesh 2.0.41-fixed.11
 * Mobile category drawer header glass guard.
 * Loaded after page-level styles so the global dark surface reset cannot
 * make the drawer header transparent again.
 */
@media (max-width: 991.98px) {
    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="categories"]
    .mobile-market-sheet__head {
        z-index: 20 !important;
        color: rgb(25, 28, 38) !important;
        border-bottom: 1px solid rgba(34, 60, 119, .12) !important;
        background: rgba(255, 255, 255, .92) !important;
        box-shadow: 0 10px 28px rgba(25, 28, 38, .08) !important;
        backdrop-filter: blur(42px) saturate(170%) !important;
        -webkit-backdrop-filter: blur(42px) saturate(170%) !important;
        isolation: isolate;
    }

    html[data-theme="dark"]
    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="categories"]
    .mobile-market-sheet__head {
        color: var(--tp-text) !important;
        border-bottom-color: rgba(255, 255, 255, .12) !important;
        background: rgba(16, 17, 18, .94) !important;
        box-shadow: 0 10px 28px rgba(0, 0, 0, .24) !important;
        backdrop-filter: blur(44px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(44px) saturate(150%) !important;
    }

    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="categories"]
    .mobile-market-sheet__close {
        background: rgba(255, 255, 255, .42) !important;
        backdrop-filter: blur(18px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
    }

    html[data-theme="dark"]
    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="categories"]
    .mobile-market-sheet__close {
        background: rgba(255, 255, 255, .055) !important;
    }
}

/*
 * Senfesh 2.0.41-fixed.13
 * Mobile business-type drawer strong glass header.
 * Snapshot: Senfesh-BusinessTypesDrawer-HeaderBlur-TargetSnapshot-20260815-131254
 */
@media (max-width: 991.98px) {
    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="business-types"]
    .mobile-market-sheet__head {
        position: sticky !important;
        top: 0 !important;
        z-index: 40 !important;
        isolation: isolate !important;
        overflow: hidden !important;
        color: rgb(25, 28, 38) !important;
        border-bottom: 1px solid rgba(34, 60, 119, .14) !important;
        background: rgba(248, 249, 252, .86) !important;
        box-shadow: 0 12px 32px rgba(25, 28, 38, .12) !important;
        backdrop-filter: blur(46px) saturate(175%) !important;
        -webkit-backdrop-filter: blur(46px) saturate(175%) !important;
    }

    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="business-types"]
    .mobile-market-sheet__head::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        pointer-events: none;
        background: rgba(255, 255, 255, .30);
        backdrop-filter: blur(28px) saturate(160%);
        -webkit-backdrop-filter: blur(28px) saturate(160%);
    }

    html[data-theme="dark"]
    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="business-types"]
    .mobile-market-sheet__head {
        color: var(--tp-text) !important;
        border-bottom-color: rgba(255, 255, 255, .12) !important;
        background: rgba(16, 17, 18, .88) !important;
        box-shadow: 0 12px 34px rgba(0, 0, 0, .34) !important;
        backdrop-filter: blur(48px) saturate(155%) !important;
        -webkit-backdrop-filter: blur(48px) saturate(155%) !important;
    }

    html[data-theme="dark"]
    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="business-types"]
    .mobile-market-sheet__head::before {
        background: rgba(16, 17, 18, .42);
        backdrop-filter: blur(30px) saturate(145%);
        -webkit-backdrop-filter: blur(30px) saturate(145%);
    }

    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="business-types"]
    .mobile-market-sheet__head > * {
        position: relative;
        z-index: 1;
    }

    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="business-types"]
    .mobile-market-sheet__close {
        background: rgba(255, 255, 255, .38) !important;
        backdrop-filter: blur(18px) saturate(150%) !important;
        -webkit-backdrop-filter: blur(18px) saturate(150%) !important;
    }

    html[data-theme="dark"]
    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="business-types"]
    .mobile-market-sheet__close {
        background: rgba(255, 255, 255, .055) !important;
    }
}



/*
 * Senfesh 2.0.41-fixed.14
 * Public storefront: fixed shared secondary header in mobile + desktop.
 * Snapshot: Senfesh-PublicStorefront-FixedSecondaryHeader-TargetSnapshot-20260815-132219
 */
:root {
    --tp-storefront-visual-top: 0px;
    --tp-storefront-visual-left: 0px;
    --tp-storefront-visual-width: 100vw;
    --tp-storefront-mobile-header-left: 12px;
    --tp-storefront-mobile-header-width: calc(100vw - 24px);
    --tp-storefront-header-height: 68px;
}

body.senfesh-front-shell.has-public-storefront-fixed-header
.storefront-secondary-header-shell {
    position: fixed !important;
    top: calc(var(--tp-storefront-visual-top) + 10px) !important;
    right: max(14px, calc((100% - 1180px) / 2)) !important;
    left: max(14px, calc((100% - 1180px) / 2)) !important;
    z-index: 2147481000 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    transform: none !important;
    contain: none !important;
    will-change: auto !important;
}

body.senfesh-front-shell.has-public-storefront-fixed-header
.storefront-page {
    padding-top: calc(var(--tp-storefront-header-height) + 40px) !important;
}

body.senfesh-front-shell.has-public-storefront-fixed-header
.storefront-secondary-header-shell
.senfesh-secondary-header {
    margin: 0 !important;
}

@media (max-width: 1199.98px) {
    body.senfesh-front-shell.has-public-storefront-fixed-header
    .storefront-secondary-header-shell {
        top: calc(var(--tp-storefront-visual-top) + 6px) !important;
        right: auto !important;
        left: var(--tp-storefront-mobile-header-left) !important;
        width: var(--tp-storefront-mobile-header-width) !important;
        max-width: 560px !important;
        margin: 0 !important;
    }

    body.senfesh-front-shell.has-public-storefront-fixed-header
    .storefront-page {
        padding-top: calc(var(--tp-storefront-header-height) + 26px) !important;
    }
}

/*
 * Senfesh 3.0.1
 * Account workspace admin access action.
 * Keeps the existing fixed/glass secondary header as the single header source.
 */
body.senfesh-front-shell
.account-workspace-secondary-shell.has-admin-action
.senfesh-secondary-header {
    box-sizing: border-box;
    padding-left: 104px;
}

body.senfesh-front-shell
.account-workspace-secondary-shell
.account-workspace-admin-link {
    position: absolute;
    top: 50%;
    left: max(14px, calc((100vw - 1180px) / 2));
    z-index: 3;
    display: inline-flex;
    min-width: 88px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: 1px solid var(--tp-glass-header-border);
    border-radius: 16px;
    color: var(--tp-glass-header-text);
    background: var(--tp-glass-item-bg);
    box-shadow: none;
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transform: translateY(-50%);
}

body.senfesh-front-shell
.account-workspace-secondary-shell
.account-workspace-admin-link:hover,
body.senfesh-front-shell
.account-workspace-secondary-shell
.account-workspace-admin-link:focus-visible {
    color: var(--tp-glass-header-text);
    border-color: var(--tp-glass-header-border);
    background: var(--tp-glass-item-hover);
    outline: none;
}

@media (max-width: 1199px) {
    body.senfesh-front-shell
    .account-workspace-secondary-shell.has-admin-action
    .senfesh-secondary-header {
        padding-left: 82px;
    }

    body.senfesh-front-shell
    .account-workspace-secondary-shell
    .account-workspace-admin-link {
        left: 14px;
        min-width: 68px;
        min-height: 44px;
        padding: 8px 12px;
        border-radius: 13px;
        font-size: .84rem;
    }
}



/*
 * Senfesh location maps.
 * OpenFreeMap + MapLibre are used only for selecting and displaying coordinates.
 */
.senfesh-map-canvas,
.wizard-map,
.store-branch-map {
    position: relative;
    overflow: hidden;
    background: var(--tp-surface, rgb(248, 249, 252));
}

.senfesh-map--unavailable {
    display: grid !important;
    place-items: center;
    min-height: 160px;
}

.senfesh-map__notice {
    max-width: 340px;
    padding: 12px 16px;
    color: var(--tp-muted, rgb(107, 114, 128));
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.9;
    text-align: center;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .senfesh-map-canvas,
    .wizard-map,
    .store-branch-map
) {
    background: #111315 !important;
}

body.senfesh-front-shell
.mobile-advertisement-map
.senfesh-map-canvas,
body.senfesh-front-shell
.advertisement-details-desktop__map
.senfesh-map-canvas {
    pointer-events: auto;
    cursor: grab;
}

body.senfesh-front-shell
.mobile-advertisement-map
.senfesh-map-canvas:active,
body.senfesh-front-shell
.advertisement-details-desktop__map
.senfesh-map-canvas:active {
    cursor: grabbing;
}

/*
 * Location picker workflow.
 */
.senfesh-location-map-shell {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: inherit;
}

.senfesh-location-map-shell > .wizard-map,
.senfesh-location-map-shell > .edit-location-map {
    width: 100%;
    min-height: 390px;
}

.senfesh-map-toolbar {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    direction: ltr;
    pointer-events: none;
}

.senfesh-map-toolbar__button {
    display: inline-flex;
    width: 138px;
    min-width: 138px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid rgba(34, 60, 119, .20);
    border-radius: 11px;
    color: var(--tp-text, rgb(25, 28, 38));
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 24px rgba(25, 28, 38, .10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font: inherit;
    font-size: .8rem;
    font-weight: 900;
    line-height: 1;
    direction: rtl;
    cursor: pointer;
    pointer-events: auto;
    transition:
        border-color .16s ease,
        background-color .16s ease,
        transform .16s ease;
}

.senfesh-map-toolbar__button:hover,
.senfesh-map-toolbar__button:focus-visible {
    border-color: rgba(34, 60, 119, .45);
    background: #fff;
    outline: none;
}

.senfesh-map-toolbar__button:active {
    transform: translateY(1px);
}

.senfesh-map-toolbar__button[aria-pressed="true"] {
    color: var(--tp-primary, rgb(34, 60, 119));
    border-color: rgba(34, 60, 119, .45);
    background: rgba(255, 255, 255, .98);
}

.senfesh-location-address {
    margin-top: 14px;
}

html[data-theme="dark"] body.senfesh-front-shell
.senfesh-map-toolbar__button {
    color: var(--tp-text);
    border-color: rgba(255, 255, 255, .13);
    background: rgba(18, 20, 22, .88);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .24);
}

html[data-theme="dark"] body.senfesh-front-shell
.senfesh-map-toolbar__button:hover,
html[data-theme="dark"] body.senfesh-front-shell
.senfesh-map-toolbar__button:focus-visible,
html[data-theme="dark"] body.senfesh-front-shell
.senfesh-map-toolbar__button[aria-pressed="true"] {
    color: var(--tp-accent, rgb(255, 160, 0));
    border-color: rgba(255, 160, 0, .34);
    background: rgba(18, 20, 22, .96);
}

@media (max-width: 575.98px) {
    .senfesh-location-map-shell > .wizard-map,
    .senfesh-location-map-shell > .edit-location-map {
        min-height: 330px;
    }

    .senfesh-map-toolbar {
        right: 9px;
        bottom: 9px;
        left: 9px;
        gap: 8px;
    }

    .senfesh-map-toolbar__button {
        width: 122px;
        min-width: 122px;
        min-height: 40px;
        padding: 7px 9px;
        font-size: .75rem;
    }
}

/*
 * Senfesh 3.5.6 CANDIDATE1
 * Mobile app-shell scroll stability.
 *
 * Fixed shell surfaces deliberately avoid transform/will-change/backdrop-filter.
 * This prevents Chrome vertical micro-jumps and Safari horizontal drift while
 * the browser UI expands/collapses during scrolling.
 */
@media (max-width: 991.98px) {
    body.senfesh-front-shell {
        --senfesh-mobile-fixed-primary-height: 59px;
        --senfesh-mobile-fixed-side-gutter: 12px;
        --senfesh-mobile-fixed-bottom-gutter: 8px;
    }

    body.senfesh-front-shell
    > .senfesh-market-header:not(.d-none),
    body.senfesh-front-shell
    > .senfesh-simple-header:not(.d-none) {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        z-index: 1050 !important;
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        transform: none !important;
        translate: none !important;
        contain: none !important;
        will-change: auto !important;
        backface-visibility: visible !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--tp-surface, #ffffff) !important;
    }

    html[data-theme="dark"]
    body.senfesh-front-shell
    > .senfesh-market-header:not(.d-none),
    html[data-theme="dark"]
    body.senfesh-front-shell
    > .senfesh-simple-header:not(.d-none) {
        background: var(--tp-surface, #17191f) !important;
    }

    body.senfesh-front-shell
    > .senfesh-market-header:not(.d-none)
    + .senfesh-main-content,
    body.senfesh-front-shell
    > .senfesh-simple-header:not(.d-none)
    + .senfesh-main-content {
        padding-top:
            calc(
                var(--senfesh-mobile-fixed-primary-height)
                + env(safe-area-inset-top)
            ) !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell {
        top: 0 !important;
        min-height:
            calc(
                64px
                + env(safe-area-inset-top)
            ) !important;
        box-sizing: border-box !important;
        padding-top: env(safe-area-inset-top) !important;
        transform: none !important;
        translate: none !important;
        contain: none !important;
        will-change: auto !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--tp-surface, #ffffff) !important;
    }

    html[data-theme="dark"]
    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell {
        background: var(--tp-surface, #17191f) !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .senfesh-main-content {
        padding-top:
            calc(
                64px
                + env(safe-area-inset-top)
            ) !important;
    }

    body.senfesh-front-shell
    .advertisement-details-page {
        padding-top: 0 !important;
    }

    body.senfesh-front-shell
    .advertisement-details-page
    > .container {
        padding-top:
            calc(
                var(--tp-ad-header-height, 64px)
                + 14px
            ) !important;
    }

    body.senfesh-front-shell
    .advertisement-secondary-header-shell {
        position: fixed !important;
        top:
            calc(
                6px
                + env(safe-area-inset-top)
            ) !important;
        right:
            max(
                var(--senfesh-mobile-fixed-side-gutter),
                calc((100% - 560px) / 2)
            ) !important;
        left:
            max(
                var(--senfesh-mobile-fixed-side-gutter),
                calc((100% - 560px) / 2)
            ) !important;
        z-index: 2147481000 !important;
        width: auto !important;
        max-width: none !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        transform: none !important;
        translate: none !important;
        contain: none !important;
        will-change: auto !important;
        backface-visibility: visible !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--tp-surface, #ffffff) !important;
    }

    html[data-theme="dark"]
    body.senfesh-front-shell
    .advertisement-secondary-header-shell {
        background: var(--tp-surface, #17191f) !important;
    }

    body.senfesh-front-shell
    .advertisement-secondary-header-shell
    .senfesh-secondary-header__title,
    body.senfesh-front-shell
    .advertisement-secondary-header-shell
    .senfesh-secondary-header__back,
    body.senfesh-front-shell
    .advertisement-secondary-header-shell
    .senfesh-secondary-header__action {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    body.senfesh-front-shell
    .advertisement-mobile-contact-bar {
        position: fixed !important;
        right:
            max(
                var(--senfesh-mobile-fixed-side-gutter),
                calc((100% - 560px) / 2)
            ) !important;
        bottom:
            calc(
                10px
                + env(safe-area-inset-bottom)
            ) !important;
        left:
            max(
                var(--senfesh-mobile-fixed-side-gutter),
                calc((100% - 560px) / 2)
            ) !important;
        z-index: 2147483000 !important;
        width: auto !important;
        max-width: none !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        transform: none !important;
        translate: none !important;
        contain: none !important;
        will-change: auto !important;
        backface-visibility: visible !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--tp-surface, #ffffff) !important;
    }

    html[data-theme="dark"]
    body.senfesh-front-shell
    .advertisement-mobile-contact-bar {
        background: var(--tp-surface, #17191f) !important;
    }

    body.senfesh-front-shell
    > .senfesh-mobile-bottom-nav {
        position: fixed !important;
        right: var(--senfesh-mobile-fixed-bottom-gutter) !important;
        bottom:
            calc(
                var(--senfesh-mobile-fixed-bottom-gutter)
                + env(safe-area-inset-bottom)
            ) !important;
        left: var(--senfesh-mobile-fixed-bottom-gutter) !important;
        width: auto !important;
        max-width: none !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        transform: none !important;
        translate: none !important;
        contain: none !important;
        will-change: auto !important;
        backface-visibility: visible !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--tp-surface, #ffffff) !important;
    }

    html[data-theme="dark"]
    body.senfesh-front-shell
    > .senfesh-mobile-bottom-nav {
        background: var(--tp-surface, #17191f) !important;
    }
}

/*
 * Senfesh 3.5.6 CANDIDATE3
 * Advertisement-details mobile app shell.
 *
 * On mobile the page uses a stable 100svh shell. The browser document does
 * not scroll; the advertisement section is the only scroll container.
 * The header is sticky inside that container and the contact bar is absolute
 * inside the stable shell.
 */
@media (max-width: 1199px) {
    html.has-advertisement-detail-app-shell {
        height: 100% !important;
        overflow: hidden !important;
        overscroll-behavior: none !important;
    }

    body.senfesh-front-shell.has-advertisement-detail-fixed-ui {
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100svh !important;
        min-height: 0 !important;
        max-height: 100svh !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        overscroll-behavior: none !important;
        transform: none !important;
        translate: none !important;
        contain: none !important;
    }

    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    > .senfesh-main-content {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        transform: none !important;
        contain: none !important;
    }

    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    .advertisement-details-page {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        touch-action: pan-y;
    }

    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    .advertisement-details-page::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
        display: none !important;
    }

    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    .advertisement-details-page
    > .container {
        width: 100% !important;
        padding-top: 0 !important;
    }

    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    .advertisement-secondary-header-shell {
        position: sticky !important;
        top: calc(6px + env(safe-area-inset-top)) !important;
        right: auto !important;
        left: auto !important;
        z-index: 2147481000 !important;
        width: min(100%, 560px) !important;
        max-width: 560px !important;
        margin:
            calc(6px + env(safe-area-inset-top))
            auto
            8px !important;
        transform: none !important;
        translate: none !important;
        contain: none !important;
        will-change: auto !important;
        backface-visibility: visible !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--tp-surface, #ffffff) !important;
    }

    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    .advertisement-mobile-contact-bar {
        position: absolute !important;
        right: max(12px, calc((100% - 560px) / 2)) !important;
        bottom: calc(10px + env(safe-area-inset-bottom)) !important;
        left: max(12px, calc((100% - 560px) / 2)) !important;
        z-index: 2147483000 !important;
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        transform: none !important;
        translate: none !important;
        contain: none !important;
        will-change: auto !important;
        backface-visibility: visible !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: var(--tp-surface, #ffffff) !important;
    }

    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    .advertisement-contact-sheet {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        bottom: calc(
            var(--tp-ad-action-height, 76px)
            + 22px
            + env(safe-area-inset-bottom)
        ) !important;
        left: 0 !important;
    }

    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    > .senfesh-market-footer,
    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    > .senfesh-simple-footer,
    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    > .senfesh-mobile-bottom-nav {
        display: none !important;
    }
}

/*
 * Senfesh 3.5.6 CANDIDATE4
 * Stable account secondary header + desktop advertisement secondary header.
 *
 * Account workspace:
 * - one symmetric three-column secondary header;
 * - admin action and back action have equal visual width;
 * - mobile account workspace uses a stable 100svh shell;
 * - only the account content region scrolls on mobile;
 * - the secondary header never participates in document scrolling.
 *
 * Advertisement details desktop:
 * - the secondary header is fixed at the top on desktop too;
 * - page content reserves its height so nothing is hidden underneath.
 */

/* Account secondary header: stable/symmetric at every size. */
body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 2147481000 !important;
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr) 96px !important;
    gap: 12px !important;
    width: 100% !important;
    min-height: 72px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding:
        10px
        max(14px, calc((100% - 1180px) / 2)) !important;
    transform: none !important;
    translate: none !important;
    contain: none !important;
    will-change: auto !important;
    backface-visibility: visible !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--tp-surface, #ffffff) !important;
}

html[data-theme="dark"]
body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell {
    background: var(--tp-surface, #17191f) !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell
> .senfesh-secondary-header {
    display: contents !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell
.senfesh-secondary-header__back {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 52px !important;
    height: 52px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: none !important;
    translate: none !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell
.senfesh-secondary-header__title {
    grid-column: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 52px !important;
    height: 52px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transform: none !important;
    translate: none !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell
> .account-workspace-admin-link {
    position: static !important;
    grid-column: 3 !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: inline-flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 52px !important;
    height: 52px !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 10px 12px !important;
    border-radius: 16px !important;
    transform: none !important;
    translate: none !important;
    contain: none !important;
    will-change: auto !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    white-space: nowrap !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .senfesh-main-content {
    padding-top: 72px !important;
}

/* Desktop advertisement details: secondary header stays fixed while content scrolls. */
@media (min-width: 1200px) {
    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    .advertisement-secondary-header-shell {
        position: fixed !important;
        top: 10px !important;
        right:
            max(
                14px,
                calc((100% - 1180px) / 2)
            ) !important;
        left:
            max(
                14px,
                calc((100% - 1180px) / 2)
            ) !important;
        z-index: 2147481000 !important;
        width: auto !important;
        max-width: none !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        transform: none !important;
        translate: none !important;
        contain: none !important;
        will-change: auto !important;
        backface-visibility: visible !important;
    }

    body.senfesh-front-shell.has-advertisement-detail-fixed-ui
    .advertisement-details-page
    > .container {
        padding-top: 96px !important;
    }
}

/* Mobile account workspace becomes a stable app-style shell. */
@media (max-width: 1199px) {
    body.senfesh-front-shell.has-account-workspace-secondary-header {
        position: fixed !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        height: 100svh !important;
        min-height: 0 !important;
        max-height: 100svh !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
        overscroll-behavior: none !important;
        transform: none !important;
        translate: none !important;
        contain: none !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        left: 0 !important;
        z-index: 2147481000 !important;
        grid-template-columns: 64px minmax(0, 1fr) 64px !important;
        gap: 8px !important;
        width: 100% !important;
        min-height:
            calc(
                60px
                + env(safe-area-inset-top)
            ) !important;
        padding:
            calc(8px + env(safe-area-inset-top))
            12px
            8px !important;
        overflow: visible !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell
    .senfesh-secondary-header__back {
        width: 64px !important;
        min-width: 64px !important;
        min-height: 44px !important;
        height: 44px !important;
        padding: 0 !important;
        border-radius: 13px !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell
    .senfesh-secondary-header__title {
        min-height: 44px !important;
        height: 44px !important;
        padding: 9px 10px !important;
        border-radius: 13px !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell
    > .account-workspace-admin-link {
        width: 64px !important;
        min-width: 64px !important;
        min-height: 44px !important;
        height: 44px !important;
        padding: 0 6px !important;
        border-radius: 13px !important;
        font-size: .82rem !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .senfesh-main-content {
        position: absolute !important;
        top:
            calc(
                60px
                + env(safe-area-inset-top)
            ) !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
        margin: 0 !important;
        padding-top: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: contain !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        touch-action: pan-y;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .senfesh-main-content::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
        display: none !important;
    }
}

/*
 * Senfesh 3.5.6 CANDIDATE5
 * Account dashboard home action + desktop create-ad hover.
 *
 * Only the account-dashboard "صفحه اصلی" action gets the wider symmetric
 * edge columns and visible text treatment below. All other account back
 * buttons preserve their current previous-step behavior and sizing.
 *
 * The desktop homepage create-ad CTA remains a blue button with white text
 * on hover/focus in light mode instead of being overridden by glass hover.
 */
body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell.is-account-dashboard {
    grid-template-columns:
        128px
        minmax(0, 1fr)
        128px !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell.is-account-dashboard
.senfesh-secondary-header__back {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 10px 12px !important;
    gap: 7px !important;
    overflow: hidden !important;
    white-space: nowrap !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell.is-account-dashboard
.senfesh-secondary-header__back span {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: nowrap !important;
    border: 0 !important;
    font-size: .88rem !important;
    line-height: 1.4 !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell.is-account-dashboard
.senfesh-secondary-header__back svg {
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 18px !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell.is-account-dashboard
> .account-workspace-admin-link {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}

@media (max-width: 1199px) {
    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell.is-account-dashboard {
        grid-template-columns:
            112px
            minmax(0, 1fr)
            112px !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell.is-account-dashboard
    .senfesh-secondary-header__back {
        width: 112px !important;
        min-width: 112px !important;
        min-height: 44px !important;
        height: 44px !important;
        padding: 0 8px !important;
        border-radius: 13px !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell.is-account-dashboard
    > .account-workspace-admin-link {
        width: 112px !important;
        min-width: 112px !important;
        min-height: 44px !important;
        height: 44px !important;
        padding: 0 8px !important;
        border-radius: 13px !important;
    }
}

html:not([data-theme="dark"])
body.senfesh-front-shell
.senfesh-header-button.senfesh-market-header__create:hover,
html:not([data-theme="dark"])
body.senfesh-front-shell
.senfesh-header-button.senfesh-market-header__create:focus,
html:not([data-theme="dark"])
body.senfesh-front-shell
.senfesh-header-button.senfesh-market-header__create:focus-visible {
    color: #ffffff !important;
    border-color: var(--senfesh-primary-hover) !important;
    background: var(--senfesh-primary-hover) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/*
 * Senfesh 3.5.8 FIXED4
 * Authentication / registration / rules secondary-header isolation.
 *
 * The legacy account-workspace shell intentionally uses a symmetric 3-column
 * grid. Authentication pages reuse the shell surface but must NOT inherit that
 * 3-column placement. Keep the inner shared header as its own grid so no-back
 * registration titles can use the full mobile width.
 */
body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell.authentication-secondary-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0 !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell.authentication-secondary-shell
> .senfesh-secondary-header {
    display: grid !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    grid-template-columns: 96px minmax(0, 1fr) !important;
    gap: 12px !important;
    direction: rtl !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell.authentication-secondary-shell
> .senfesh-secondary-header.senfesh-secondary-header--no-back {
    grid-template-columns: minmax(0, 1fr) !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell.authentication-secondary-shell
> .senfesh-secondary-header
> .senfesh-secondary-header__title {
    grid-column: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell.authentication-secondary-shell
> .senfesh-secondary-header.senfesh-secondary-header--no-back
> .senfesh-secondary-header__title {
    grid-column: 1 / -1 !important;
}

body.senfesh-front-shell.has-account-workspace-secondary-header
> .account-workspace-secondary-shell.authentication-secondary-shell
> .senfesh-secondary-header
> .senfesh-secondary-header__back {
    grid-column: auto !important;
}

@media (max-width: 1199px) {
    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell.authentication-secondary-shell {
        grid-template-columns: minmax(0, 1fr) !important;
        padding:
            calc(8px + env(safe-area-inset-top))
            12px
            8px !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell.authentication-secondary-shell
    > .senfesh-secondary-header {
        grid-template-columns: 44px minmax(0, 1fr) !important;
        gap: 8px !important;
        max-width: none !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell.authentication-secondary-shell
    > .senfesh-secondary-header.senfesh-secondary-header--no-back {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell.authentication-secondary-shell
    > .senfesh-secondary-header
    > .senfesh-secondary-header__title {
        grid-column: auto !important;
        min-height: 44px !important;
        height: auto !important;
        padding: 9px 14px !important;
        font-size: 1rem !important;
        line-height: 1.55 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell.authentication-secondary-shell
    > .senfesh-secondary-header.senfesh-secondary-header--no-back
    > .senfesh-secondary-header__title {
        grid-column: 1 / -1 !important;
        justify-self: stretch !important;
    }

    body.senfesh-front-shell.has-account-workspace-secondary-header
    > .account-workspace-secondary-shell.authentication-secondary-shell
    > .senfesh-secondary-header
    > .senfesh-secondary-header__back {
        grid-column: auto !important;
        width: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
    }
}



/* ==========================================================================
   Senfesh 3.5.9 PART6 - final dark emphasis audit
   The final cascade layer prevents legacy navy emphasis on dark surfaces.
   ========================================================================== */
html[data-theme="dark"] body.senfesh-front-shell
.mobile-market-tools__button.is-active {
    color: var(--tp-accent) !important;
    border-color: rgba(255, 160, 0, .28) !important;
    background: rgba(255, 160, 0, .10) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.mobile-market-tools__count {
    color: #111111 !important;
    background: var(--tp-accent) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
#approximateLocationButton[aria-pressed="true"] {
    color: #111111 !important;
    border-color: var(--tp-accent) !important;
    background: var(--tp-accent) !important;
}


/* ==========================================================================
   Senfesh 3.5.9 PART8 - unified front notice / warning standard
   Use .senfesh-notice for new project notices. Existing Bootstrap alerts,
   validation summaries and ad-wizard notices inherit the same language.
   ========================================================================== */

body.senfesh-front-shell {
    --senfesh-notice-radius: 14px;
    --senfesh-notice-warning-text: #684000;
    --senfesh-notice-warning-border: rgba(255, 160, 0, .30);
    --senfesh-notice-warning-bg:
        linear-gradient(
            135deg,
            rgba(255, 160, 0, .16),
            rgba(255, 160, 0, .045)
        );
    --senfesh-notice-danger-text: #a72525;
    --senfesh-notice-danger-border: rgba(220, 53, 69, .24);
    --senfesh-notice-danger-bg:
        linear-gradient(
            135deg,
            rgba(220, 53, 69, .10),
            rgba(220, 53, 69, .035)
        );
    --senfesh-notice-success-text: #176b39;
    --senfesh-notice-success-border: rgba(35, 132, 71, .24);
    --senfesh-notice-success-bg:
        linear-gradient(
            135deg,
            rgba(35, 132, 71, .10),
            rgba(35, 132, 71, .035)
        );
}

body.senfesh-front-shell
:is(
    .alert,
    .senfesh-notice,
    .validation-summary-errors
) {
    border-width: 1px !important;
    border-style: solid !important;
    border-radius: var(--senfesh-notice-radius) !important;
    box-shadow: none !important;
    font-family:
        var(
            --senfesh-font-family,
            "SenfeshIRANSans",
            "IRANSansX",
            Tahoma,
            Arial,
            sans-serif
        ) !important;
    line-height: 1.9;
}

body.senfesh-front-shell
:is(
    .alert-warning,
    .senfesh-notice--warning,
    .validation-summary-errors,
    .wizard-notice
) {
    color: var(--senfesh-notice-warning-text) !important;
    border-color: var(--senfesh-notice-warning-border) !important;
    background: var(--senfesh-notice-warning-bg) !important;
}

body.senfesh-front-shell
.wizard-notice {
    border-right: 4px solid rgb(255, 160, 0) !important;
    box-shadow: 0 16px 40px rgba(25, 28, 38, .12) !important;
    backdrop-filter: blur(12px);
}

body.senfesh-front-shell
.wizard-notice strong {
    color: #875000 !important;
}

body.senfesh-front-shell
.wizard-notice span {
    color: #493a24 !important;
}

body.senfesh-front-shell
:is(
    .alert-danger,
    .senfesh-notice--danger
) {
    color: var(--senfesh-notice-danger-text) !important;
    border-color: var(--senfesh-notice-danger-border) !important;
    background: var(--senfesh-notice-danger-bg) !important;
}

body.senfesh-front-shell
:is(
    .alert-success,
    .senfesh-notice--success
) {
    color: var(--senfesh-notice-success-text) !important;
    border-color: var(--senfesh-notice-success-border) !important;
    background: var(--senfesh-notice-success-bg) !important;
}

body.senfesh-front-shell
:is(
    .alert-info,
    .alert-secondary,
    .senfesh-notice--neutral
) {
    color: rgb(79, 86, 99) !important;
    border-color: rgb(225, 228, 236) !important;
    background:
        linear-gradient(
            135deg,
            rgba(34, 60, 119, .045),
            rgba(248, 249, 252, .82)
        ) !important;
}

/* Dark-mode notice surfaces are never white. */
html[data-theme="dark"] body.senfesh-front-shell {
    --senfesh-notice-warning-text: #ffe0a0;
    --senfesh-notice-warning-border: rgba(255, 160, 0, .30);
    --senfesh-notice-warning-bg:
        linear-gradient(
            135deg,
            rgba(255, 160, 0, .17),
            rgba(255, 160, 0, .045)
        ),
        #17191d;
    --senfesh-notice-danger-text: #ffb0b0;
    --senfesh-notice-danger-border: rgba(255, 141, 141, .27);
    --senfesh-notice-danger-bg:
        linear-gradient(
            135deg,
            rgba(255, 141, 141, .10),
            rgba(255, 141, 141, .03)
        ),
        #17191d;
    --senfesh-notice-success-text: #a8e8bb;
    --senfesh-notice-success-border: rgba(134, 216, 160, .26);
    --senfesh-notice-success-bg:
        linear-gradient(
            135deg,
            rgba(134, 216, 160, .10),
            rgba(134, 216, 160, .03)
        ),
        #17191d;
}

html[data-theme="dark"] body.senfesh-front-shell
.wizard-notice {
    box-shadow: 0 18px 48px rgba(0, 0, 0, .38) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.wizard-notice strong {
    color: #ffd176 !important;
}

html[data-theme="dark"] body.senfesh-front-shell
.wizard-notice span {
    color: var(--tp-text) !important;
}

html[data-theme="dark"] body.senfesh-front-shell
:is(
    .alert-info,
    .alert-secondary,
    .senfesh-notice--neutral
) {
    color: var(--tp-muted) !important;
    border-color: var(--tp-border) !important;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, .035),
            rgba(255, 255, 255, .015)
        ),
        var(--tp-surface) !important;
}

/* Dark/light urgent labels retain the same compact orange identity. */
html[data-theme="dark"] body.senfesh-front-shell
:is(
    .market-badge-urgent,
    .senfesh-urgent-badge,
    .advertisement-urgent-image-badge
) {
    color: #ffffff !important;
    background: rgb(255, 138, 0) !important;
    border-color: rgb(255, 138, 0) !important;
}

/* Front-end reliability fixes: contained scrolling, compact branch editors. */
html:has(body.senfesh-front-shell) {
    overscroll-behavior-y: none;
}
body.senfesh-front-shell {
    overscroll-behavior-y: none;
}
body.senfesh-front-shell .senfesh-main-content,
body.senfesh-front-shell .store-management-workspace,
body.senfesh-front-shell .storefront-products,
body.senfesh-front-shell .ads-desktop-sidebar {
    overscroll-behavior-y: contain;
}

/* ========================================================================== 
   Senfesh 3.6.0 - mobile drawer and public storefront reliability
   ========================================================================== */
@media (max-width: 991.98px) {
    /* The final dark-theme cascade previously made the sticky sheet header
       transparent, so filter/category rows appeared underneath its title. */
    body.senfesh-front-shell
    .ads-desktop-sidebar.is-mobile-open
    .mobile-market-sheet__head {
        position: sticky !important;
        top: 0 !important;
        z-index: 120 !important;
        isolation: isolate !important;
        flex: 0 0 auto !important;
        min-height: 56px !important;
        box-sizing: border-box !important;
        color: rgb(25, 28, 38) !important;
        border-bottom: 1px solid rgba(34, 60, 119, .14) !important;
        background: rgb(255, 255, 255) !important;
        box-shadow: 0 8px 22px rgba(25, 28, 38, .10) !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    html[data-theme="dark"]
    body.senfesh-front-shell
    .ads-desktop-sidebar.is-mobile-open
    .mobile-market-sheet__head {
        color: var(--tp-text) !important;
        border-bottom-color: var(--tp-border) !important;
        background: rgb(16, 17, 18) !important;
        box-shadow: 0 8px 22px rgba(0, 0, 0, .34) !important;
    }

    body.senfesh-front-shell
    .ads-desktop-sidebar.is-mobile-open
    .mobile-market-sheet__head::before {
        display: none !important;
    }

    body.senfesh-front-shell
    .ads-desktop-sidebar.is-mobile-open
    > :not(.mobile-market-sheet__head) {
        position: relative;
        z-index: 1;
    }

    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="filters"],
    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="business-types"],
    body.senfesh-front-shell
    .ads-desktop-sidebar[data-mobile-mode="businesses"] {
        scroll-padding-top: 56px;
    }

    /* One media hierarchy: full-width cover, then a circular right-side logo
       with tagline/rating/membership in the adjacent right-aligned block. */
    body.senfesh-front-shell .storefront-mobile-media-row {
        display: none !important;
    }

    body.senfesh-front-shell .storefront-cover {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        min-height: 128px;
        aspect-ratio: 16 / 6;
        border-radius: 0 !important;
        overflow: hidden !important;
    }

    body.senfesh-front-shell .storefront-cover img {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    body.senfesh-front-shell .storefront-profile__content {
        display: grid !important;
        grid-template-columns: 82px minmax(0, 1fr) !important;
        gap: 12px !important;
        align-items: start !important;
        direction: rtl;
        padding: 12px 14px 14px !important;
        overflow: visible !important;
    }

    body.senfesh-front-shell .storefront-avatar {
        display: grid !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 82px !important;
        height: 82px !important;
        margin: -42px 0 0 !important;
        place-items: center;
        box-sizing: border-box !important;
        border: 4px solid var(--tp-page-bg, #fff) !important;
        border-radius: 50% !important;
        background: var(--tp-page-bg, #fff) !important;
        box-shadow: 0 8px 22px rgba(17, 24, 39, .18) !important;
        overflow: hidden !important;
    }

    body.senfesh-front-shell .storefront-avatar img {
        display: block;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        object-fit: cover !important;
        border-radius: 50% !important;
    }

    body.senfesh-front-shell .storefront-identity {
        grid-column: 2 !important;
        grid-row: 1 !important;
        min-width: 0 !important;
        align-self: start;
        text-align: right !important;
    }

    body.senfesh-front-shell .storefront-tagline {
        margin-top: 0 !important;
    }

    body.senfesh-front-shell .storefront-meta {
        justify-content: flex-start;
    }

    body.senfesh-front-shell .storefront-actions {
        grid-column: 1 / -1 !important;
    }

    body.senfesh-front-shell .storefront-main,
    body.senfesh-front-shell .storefront-section,
    body.senfesh-front-shell .storefront-grid {
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body.senfesh-front-shell .storefront-main,
    body.senfesh-front-shell .storefront-section {
        overflow-x: clip !important;
    }

    body.senfesh-front-shell .storefront-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        grid-template-columns: 84px minmax(0, 1fr) !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        contain: paint;
    }

    body.senfesh-front-shell .storefront-card__media {
        width: 84px !important;
        min-width: 0 !important;
        max-width: 84px !important;
        height: 84px !important;
        overflow: hidden !important;
        contain: paint;
    }

    body.senfesh-front-shell .storefront-card__media > img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        object-fit: cover !important;
    }

    body.senfesh-front-shell .storefront-card__caption {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }
}

body.senfesh-front-shell.has-public-storefront-fixed-header
.storefront-tabs {
    top: calc(
        var(--tp-storefront-visual-top, 0px) +
        var(--tp-storefront-header-height, 68px) +
        20px
    ) !important;
}

@media (max-width: 1199.98px) {
    body.senfesh-front-shell.has-public-storefront-fixed-header
    .storefront-tabs {
        top: calc(
            var(--tp-storefront-visual-top, 0px) +
            var(--tp-storefront-header-height, 68px) +
            12px
        ) !important;
    }
}
.store-branch-card {
    display: block;
}
.store-branch-card__summary {
    cursor: pointer;
    padding: 10px 4px;
    min-height: 44px;
    margin: 0 !important;
}
.store-branch-card__summary::marker {
    color: var(--tp-muted, #6b7280);
}
.store-branch-card__summary:focus-visible {
    outline: 2px solid var(--tp-primary, #2452db);
    outline-offset: 3px;
}
.store-branch-card__edit {
    margin-inline-start: auto;
    font-size: .8rem;
    color: var(--tp-muted, #6b7280);
}
.store-branch-card__body {
    padding-top: 16px;
}
.store-city-search {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
}
.store-city-search select[size]:not([size="0"]) {
    min-height: 110px;
    background-image: none;
    padding: 6px;
}
.store-city-search__status {
    color: var(--tp-muted, #6b7280);
}
.divar-mobile-image .is-image-unavailable {
    opacity: 0;
}
.image-load-fallback {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 8px;
    text-align: center;
    font-size: 11px;
    color: var(--tp-muted, #6b7280);
}
#mobileAdvertisementMedia {
    touch-action: pan-y pinch-zoom;
}
#mobileAdvertisementMedia img {
    -webkit-user-drag: none;
    user-select: none;
}
/* Remove only the UI's white backing, not white pixels inside uploaded files. */
html body.senfesh-front-shell .storefront-page .storefront-mobile-media-row,
html body.senfesh-front-shell .storefront-page .storefront-profile,
html body.senfesh-front-shell .storefront-page .storefront-mobile-avatar,
html body.senfesh-front-shell .storefront-page .storefront-avatar {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
html body.senfesh-front-shell .storefront-mobile-avatar img {
    padding: 0 !important;
}
html body.senfesh-front-shell .storefront-cover:not(.storefront-cover--empty),
html body.senfesh-front-shell .storefront-mobile-cover:not(.storefront-mobile-cover--empty) {
    background: transparent !important;
}

/*
 * Public storefront mobile scroll ownership.
 * Store pages use normal document scrolling even when the previous page used
 * one of the fixed mobile app shells.
 */
@media (max-width: 1199.98px) {
    html:has(
        body.senfesh-front-shell.has-public-storefront-fixed-header:not(
            .has-storefront-contact-sheet-open
        )
    ) {
        height: auto !important;
        min-height: 100% !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        overscroll-behavior-y: auto !important;
        touch-action: pan-y pinch-zoom !important;
    }

    body.senfesh-front-shell.has-public-storefront-fixed-header:not(
        .has-storefront-contact-sheet-open
    ) {
        position: static !important;
        inset: auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 100% !important;
        max-height: none !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        overscroll-behavior-y: auto !important;
        touch-action: pan-y pinch-zoom !important;
    }

    body.senfesh-front-shell.has-public-storefront-fixed-header:not(
        .has-storefront-contact-sheet-open
    ) > .senfesh-main-content,
    body.senfesh-front-shell.has-public-storefront-fixed-header:not(
        .has-storefront-contact-sheet-open
    ) .storefront-page {
        position: static !important;
        inset: auto !important;
        width: auto !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow: visible !important;
        overscroll-behavior-y: auto !important;
        touch-action: pan-y pinch-zoom !important;
    }
}

/* Senfesh 3.6.0 must remain the last storefront geometry layer. */
@media (max-width: 991.98px) {
    html body.senfesh-front-shell .storefront-page {
        max-width: 100% !important;
        overflow-x: clip !important;
    }

    html body.senfesh-front-shell
    .storefront-page .storefront-avatar {
        border-color: var(--tp-page-bg, #fff) !important;
        background: var(--tp-page-bg, #fff) !important;
        box-shadow: 0 8px 22px rgba(17, 24, 39, .18) !important;
    }

    html body.senfesh-front-shell
    .storefront-page .storefront-card,
    html body.senfesh-front-shell
    .storefront-page .storefront-card__media {
        overflow: hidden !important;
    }
}
