﻿:root {
    --senfesh-primary: #174bd7;
    --senfesh-primary-hover: #123cad;
    --senfesh-background: #f7f8fa;
    --senfesh-surface: #ffffff;
    --senfesh-text: #1f2937;
    --senfesh-muted: #6b7280;
    --senfesh-border: #e5e7eb;
    --senfesh-radius: 10px;
    --senfesh-header-height: 58px;
    --senfesh-glass-bg: rgba(255, 255, 255, .62);
    --senfesh-glass-bg-strong: rgba(255, 255, 255, .76);
    --senfesh-glass-item-bg: rgba(255, 255, 255, .22);
    --senfesh-glass-item-hover: rgba(255, 255, 255, .42);
    --senfesh-glass-border: rgba(34, 60, 119, .10);
    --senfesh-glass-shadow: 0 10px 30px rgba(23, 37, 74, .08);
}

html[data-theme="dark"] {
    --senfesh-background: #111318;
    --senfesh-surface: #17191f;
    --senfesh-text: #f5f6f8;
    --senfesh-muted: #9ca3af;
    --senfesh-border: #2d313a;
    --senfesh-glass-bg: rgba(16, 17, 18, .58);
    --senfesh-glass-bg-strong: rgba(20, 22, 24, .72);
    --senfesh-glass-item-bg: rgba(255, 255, 255, .035);
    --senfesh-glass-item-hover: rgba(255, 255, 255, .065);
    --senfesh-glass-border: rgba(255, 255, 255, .08);
    --senfesh-glass-shadow: 0 12px 36px rgba(0, 0, 0, .22);
}

html,
body {
    min-height: 100%;
}

body.senfesh-front-shell {
    margin: 0;
    color: var(--senfesh-text);
    background: var(--senfesh-background);
}

.senfesh-main-content {
    min-height: calc(100vh - 104px);
}

.senfesh-market-header,
.senfesh-simple-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    border-bottom: 1px solid var(--senfesh-glass-border);
    background: var(--senfesh-glass-bg);
    box-shadow: var(--senfesh-glass-shadow);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
}

.senfesh-market-header__inner,
.senfesh-simple-header__inner,
.senfesh-market-footer__inner,
.senfesh-simple-footer__inner {
    width: min(100% - 24px, 1280px);
    margin-inline: auto;
}

.senfesh-market-header__inner {
    display: grid;
    min-height: var(--senfesh-header-height);
    align-items: center;
    grid-template-columns: auto minmax(280px, 1fr) auto;
    gap: 10px;
}

.senfesh-header-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid var(--senfesh-glass-border);
    border-radius: var(--senfesh-radius);
    color: var(--senfesh-text);
    background: var(--senfesh-glass-item-bg);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.senfesh-header-button:hover,
.senfesh-header-button.is-active {
    border-color: var(--senfesh-primary);
    color: var(--senfesh-primary);
    background: var(--senfesh-glass-item-hover);
}

.senfesh-market-header__brand {
    font-size: 1rem;
    font-weight: 950;
}

.senfesh-market-header__search-row {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.senfesh-market-header__search {
    position: relative;
    min-width: 0;
}

.senfesh-market-header__search > span {
    position: absolute;
    top: 50%;
    right: 13px;
    color: var(--senfesh-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.senfesh-market-header__search input {
    width: 100%;
    min-height: 38px;
    padding: 6px 40px 6px 12px;
    border: 1px solid var(--senfesh-border);
    border-radius: var(--senfesh-radius);
    outline: 0;
    color: var(--senfesh-text);
    background: var(--senfesh-background);
    font: inherit;
}

.senfesh-market-header__search input:focus {
    border-color: var(--senfesh-primary);
}

.senfesh-market-header__location {
    min-width: 88px;
}

.senfesh-market-header__desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.senfesh-header-button.senfesh-market-header__create {
    border-color: var(--senfesh-primary);
    color: #ffffff !important;
    background: var(--senfesh-primary);
}

.senfesh-header-button.senfesh-market-header__create:hover,
.senfesh-header-button.senfesh-market-header__create:focus {
    border-color: var(--senfesh-primary-hover);
    color: #ffffff !important;
    background: var(--senfesh-primary-hover);
}

.senfesh-market-header__desktop-create {
    min-width: 88px;
}

.senfesh-simple-header__inner {
    display: grid;
    min-height: var(--senfesh-header-height);
    align-items: center;
    grid-template-columns: minmax(70px, 1fr) auto minmax(70px, 1fr);
    gap: 10px;
}

.senfesh-simple-header__title {
    color: var(--senfesh-text);
    font-weight: 900;
    text-decoration: none;
}

.senfesh-simple-header__actions {
    justify-self: end;
}

.senfesh-market-footer,
.senfesh-simple-footer {
    border-top: 1px solid var(--senfesh-border);
    background: var(--senfesh-surface);
}

.senfesh-market-footer__inner,
.senfesh-simple-footer__inner {
    display: flex;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--senfesh-muted);
    font-size: .74rem;
}

.senfesh-market-footer__inner strong,
.senfesh-simple-footer__inner strong {
    color: var(--senfesh-text);
}

.senfesh-mobile-bottom-nav {
    display: none;
}

@media (max-width: 991px) {
    body.header-mode-marketplace {
        padding-bottom: calc(84px + env(safe-area-inset-bottom));
    }

    .senfesh-market-header__inner {
        display: block;
        width: 100%;
        min-height: auto;
        padding:
            calc(8px + env(safe-area-inset-top))
            10px
            9px;
    }

    .senfesh-market-header__brand,
    .senfesh-market-header__desktop-create {
        display: none;
    }

    .senfesh-market-header__search-row {
        grid-template-columns:
            minmax(0, 1fr)
            92px;
    }

    .senfesh-market-header__search input,
    .senfesh-market-header__location {
        min-height: 42px;
    }

    .senfesh-market-header__desktop-nav,
    .senfesh-market-footer {
        display: none;
    }

    .senfesh-mobile-bottom-nav {
        position: fixed;
        right: 8px;
        bottom: max(8px, env(safe-area-inset-bottom));
        left: 8px;
        z-index: 1100;
        display: grid;
        min-height: 68px;
        padding: 6px 6px 7px;
        border: 1px solid var(--senfesh-border);
        border-radius: 20px;
        background: color-mix(
            in srgb,
            var(--senfesh-surface) 92%,
            transparent
        );
        box-shadow:
            0 12px 34px rgba(25, 28, 38, .16),
            0 2px 8px rgba(25, 28, 38, .08);
        backdrop-filter: blur(18px) saturate(150%);
        -webkit-backdrop-filter: blur(18px) saturate(150%);
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .senfesh-mobile-bottom-nav__item {
        position: relative;
        display: flex;
        min-width: 0;
        min-height: 54px;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 4px 2px 2px;
        border-radius: 14px;
        color: var(--senfesh-muted);
        text-decoration: none;
        flex-direction: column;
        transition:
            color .18s ease,
            background-color .18s ease,
            transform .18s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .senfesh-mobile-bottom-nav__item:active {
        transform: scale(.96);
    }

    .senfesh-mobile-bottom-nav__icon {
        display: inline-flex;
        width: 34px;
        height: 28px;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        transition:
            background-color .18s ease,
            box-shadow .18s ease,
            transform .18s ease;
    }

    .senfesh-mobile-bottom-nav svg {
        display: block;
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .senfesh-mobile-bottom-nav__item small {
        overflow: hidden;
        max-width: 100%;
        color: inherit;
        font-size: .66rem;
        font-weight: 850;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .senfesh-mobile-bottom-nav__item.is-active {
        color: var(--senfesh-primary);
    }

    .senfesh-mobile-bottom-nav__item.is-active
    .senfesh-mobile-bottom-nav__icon {
        background: rgba(34, 60, 119, .10);
        box-shadow: inset 0 0 0 1px rgba(34, 60, 119, .06);
        transform: translateY(-1px);
    }

    .senfesh-mobile-bottom-nav__item.is-active::after {
        position: absolute;
        bottom: 1px;
        width: 18px;
        height: 3px;
        border-radius: 999px;
        background: var(--senfesh-primary);
        content: "";
    }

    .senfesh-mobile-bottom-nav__create {
        color: var(--senfesh-primary);
    }

    .senfesh-mobile-bottom-nav__create-icon {
        display: inline-flex;
        width: 46px;
        height: 46px;
        align-items: center;
        justify-content: center;
        margin-top: -22px;
        border: 4px solid var(--senfesh-surface);
        border-radius: 50%;
        color: #ffffff;
        background: var(--senfesh-primary);
        box-shadow:
            0 8px 18px rgba(34, 60, 119, .24),
            0 2px 6px rgba(34, 60, 119, .16);
        transition:
            transform .18s ease,
            background-color .18s ease,
            box-shadow .18s ease;
    }

    .senfesh-mobile-bottom-nav__create-icon svg {
        width: 24px;
        height: 24px;
        stroke-width: 2.2;
    }

    .senfesh-mobile-bottom-nav__create:active
    .senfesh-mobile-bottom-nav__create-icon {
        transform: scale(.94);
    }

    .senfesh-simple-footer__inner {
        min-height: 54px;
        padding-block: 8px;
        text-align: center;
        flex-direction: column;
    }
}
@media (max-width: 991px) {
    html[data-theme="dark"]
    .senfesh-mobile-bottom-nav {
        box-shadow:
            0 12px 34px rgba(0, 0, 0, .34),
            0 2px 8px rgba(0, 0, 0, .22);
    }

    html[data-theme="dark"]
    .senfesh-mobile-bottom-nav__item.is-active
    .senfesh-mobile-bottom-nav__icon {
        background: rgba(255, 255, 255, .08);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
    }
}

/* Senfesh front navigation without temporary text-symbol icons */
.senfesh-market-header__search input {
    padding-right: 12px !important;
}

/* Senfesh mobile structure rules */
@media (max-width: 991px) {
    .senfesh-market-footer,
    .senfesh-simple-footer {
        display: none !important;
    }

    body:has(.senfesh-mobile-bottom-nav) {
        padding-bottom: calc(84px + env(safe-area-inset-bottom));
    }
}

/* Senfesh approved mobile page cleanup */
@media (max-width: 991px) {
    .mobile-primary-without-header .senfesh-market-header {
        display: none !important;
    }

    .mobile-primary-without-header .senfesh-main-content {
        min-height: calc(
            100dvh -
            84px -
            env(safe-area-inset-bottom)
        );
    }

    .mobile-advertisement-create .senfesh-simple-header__actions {
        display: none !important;
    }

    .mobile-advertisement-create .senfesh-simple-header__inner {
        grid-template-columns: 1fr auto 1fr;
    }

    .mobile-advertisement-create .senfesh-main-content {
        min-height: 0;
    }

    .mobile-advertisement-create .senfesh-market-footer,
    .mobile-advertisement-create .senfesh-simple-footer {
        display: none !important;
    }
}

/* Senfesh 1.0.11 - standard desktop header on advertisement create */
.senfesh-create-mobile-simple-header {
    display: none;
}

@media (max-width: 991px) {
    .mobile-advertisement-create .senfesh-market-header {
        display: none !important;
    }

    .mobile-advertisement-create .senfesh-create-mobile-simple-header {
        display: block;
    }
}
