/* Main Web Site Layout Styles - Bootstrap 5 Customizations */

/* Smooth theme transitions */
:root {
    transition: background-color 0.3s ease, color 0.3s ease;
    --bs-border-radius-sm: .625rem !important; /* Overwrites the border radius */
}

[data-bs-theme="light"] {
    --mp-bg: #ffffff;
    --mp-fg: #111827;
    --mp-muted: #6b7280;
    --mp-border: rgba(17, 24, 39, 0.10);
    --mp-card: #ffffff;
    --mp-hero-top: #eef6ff;
    --mp-hero-bottom: #ffffff;
    --mp-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    --mp-pill: rgba(59, 130, 246, 0.10);
    --mp-link: #2563eb;
    --mp-overlay: rgba(0, 0, 0, 0.55);
    --accent: 214 80% 95%;
}

[data-bs-theme="dark"] {
    --mp-bg: #0b1220;
    --mp-fg: #e5e7eb;
    --mp-muted: #a1a1aa;
    --mp-border: rgba(148, 163, 184, 0.18);
    --mp-card: #0f172a;
    --mp-hero-top: #0b1220;
    --mp-hero-bottom: #0f172a;
    --mp-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
    --mp-pill: rgba(59, 130, 246, 0.16);
    --mp-link: #60a5fa;
    --accent: 217 40% 16%;
}

.min-vh-100 {
    background: var(--mp-bg);
    color: var(--mp-fg);
}

h1, h2, h3, h4, h5, h6 {
    border: none !important;
    outline: none !important;
}

.mainpage-header {
    background: rgba(var(--mp-bg), 0.8);
    backdrop-filter: blur(50px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-link {
    color: var(--mp-muted);
}

    .nav-link:hover {
        color: var(--mp-fg);
    }

.hero {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    border-bottom: 1px solid var(--mp-border);
    background: linear-gradient(to bottom, hsl(var(--accent)) 0%, var(--mp-bg) 100%);
}

.brand-badge {
    width: 28px;
    height: 28px;
    background: #2563eb;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.brand-text {
    color: var(--mp-fg);
    letter-spacing: 0.2px;
}

.searchbar {
    max-width: 720px;
    border: 1px solid var(--mp-border);
    background: var(--mp-card);
    box-shadow: var(--mp-shadow);
    overflow: hidden;
}

    .searchbar :global(.form-control) {
        background: transparent;
        color: var(--mp-fg);
    }

    .searchbar :global(.form-control::placeholder) {
        color: var(--mp-muted);
    }

    .searchbar :global(.form-control:focus) {
        box-shadow: none;
    }

.category-card {
    border: 1px solid var(--mp-border);
    background: var(--mp-card);
    padding: 14px 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

    .category-card:hover {
        border-color: rgba(37, 99, 235, 0.35);
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
        transform: translateY(-4px);
    }

        .category-card:hover .icon-pill {
            background: var(--bs-primary);
            color: var(--accent);
        }

    .category-card.active {
        background-color: var(--bs-primary);
        color: white;
        border-color: var(--bs-primary);
    }

        .category-card.active .text-secondary {
            color: rgba(255, 255, 255, 0.8) !important;
        }

.icon-pill {
    width: 44px;
    height: 44px;
    background: var(--mp-pill);
    color: var(--bs-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.listing-card {
    border: 1px solid var(--mp-border);
    background: var(--mp-card);
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

    .listing-card:hover {
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
        transform: translateY(-4px);
    }

.listing-image-wrap {
    position: relative;
    overflow: hidden;
}

.listing-image {
    width: 100%;
    height: 170px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

    .listing-card:hover .listing-image {
        transform: scale(1.08);
    }

.listing-card-horizontal {
    border: 1px solid var(--mp-border);
    background: var(--mp-card);
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

    .listing-card-horizontal:hover {
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
        transform: translateY(-4px);
    }

    .listing-card-horizontal:hover .listing-image {
        transform: scale(1.08);
    }

.listing-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    border-radius: 999px;
}

.body-content {
    
}

.card-no-border {
    border-width: 0px;
    background-color: transparent;
}

.card-default {
    border: 1px solid var(--mp-border);
    /*background: var(--mp-card);*/
    background: linear-gradient(to bottom, hsl(var(--accent)) 0%, var(--mp-bg) 100%);
    padding: 14px 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

:global(.text-secondary) {
    color: var(--mp-muted) !important;
}

:global(a) {
    color: var(--mp-link);
}

:global(.border-bottom) {
    border-color: var(--mp-border) !important;
}

:global(.toast) {
    background: var(--mp-card);
    color: var(--mp-fg);
    border: 1px solid var(--mp-border);
}

:global(.toast-header) {
    background: var(--mp-card);
    color: var(--mp-fg);
    border-bottom: 1px solid var(--mp-border);
}

:global(.btn-outline-secondary) {
    --bs-btn-color: var(--mp-muted);
    --bs-btn-border-color: var(--mp-border);
    --bs-btn-hover-color: var(--mp-fg);
    --bs-btn-hover-bg: rgba(148, 163, 184, 0.12);
    --bs-btn-hover-border-color: rgba(148, 163, 184, 0.22);
}

/* Culture switcher styling */
.culture-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative; /* Important for dropdown positioning */
}

    .culture-switcher .dropdown-menu {
        position: absolute;
        top: 100%; /* Position below the button */
        right: 0; /* Align to right due to dropdown-menu-end */
        left: auto;
        z-index: 1000;
        min-width: 10rem;
        margin: 0.125rem 0 0;
        background-color: var(--mp-card);
        border: 1px solid var(--mp-border);
        border-radius: var(--bs-border-radius);
        box-shadow: var(--mp-shadow);
        display: none; /* Hide by default */
    }

        .culture-switcher .dropdown-menu.show {
            display: block; /* Show when open */
        }

    .culture-switcher .dropdown-item {
        display: block;
        width: 100%;
        padding: 0.5rem 1rem;
        clear: both;
        font-weight: 400;
        color: var(--mp-fg);
        text-align: inherit;
        text-decoration: none;
        white-space: nowrap;
        background-color: transparent;
        border: 0;
        transition: background-color 0.15s ease-in-out;
        cursor: pointer;
    }

        .culture-switcher .dropdown-item:hover,
        .culture-switcher .dropdown-item:focus {
            color: var(--mp-fg);
            background-color: rgba(148, 163, 184, 0.1);
        }

        .culture-switcher .dropdown-item.active {
            color: #fff;
            background-color: #2563eb;
        }

    .culture-switcher .form-select-sm {
        width: auto;
        min-width: 150px;
        font-size: 0.875rem;
        padding: 0.25rem 2rem 0.25rem 0.5rem;
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--color-primary-text);
        border: 1px solid rgba(255, 255, 255, 0.2);
        cursor: pointer;
        transition: all 0.2s ease;
    }

        .culture-switcher .form-select-sm:hover {
            background-color: rgba(255, 255, 255, 0.15);
            border-color: rgba(255, 255, 255, 0.3);
        }

        .culture-switcher .form-select-sm:focus {
            background-color: rgba(255, 255, 255, 0.2);
            border-color: rgba(255, 255, 255, 0.4);
            outline: none;
            box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
        }

        .culture-switcher .form-select-sm:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .culture-switcher .form-select-sm option {
            background-color: #305baa;
            color: var(--color-primary-text);
        }

    .culture-switcher .spinner-border-sm {
        width: 1rem;
        height: 1rem;
        border-width: 0.15rem;
        color: var(--color-primary-text);
    }

@media (max-width : 992px) {
    .logo {
        text-align: center;
        height: 28px;
    }

    .culture-switcher .form-select-sm {
        min-width: 120px;
        font-size: 0.8rem;
    }
}

.postad-steps {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.step {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.step-badge {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    color: var(--mp-muted);
    background: var(--mp-card);
    border: 1px solid var(--mp-border);
}

    .step-badge.active {
        color: white;
        background: rgba(59, 130, 246, .9);
        border-color: rgba(59, 130, 246, 1);
        box-shadow: 0 12px 28px rgba(59, 130, 246, .25);
    }

.step-text {
    color: var(--mp-muted);
    font-size: .9rem;
    font-weight: 600;
}

.step[aria-current="step"] .step-text {
    color: var(--mp-fg);
}

.step-line {
    height: 2px;
    flex: 1 1 auto;
    background: var(--mp-border);
    border-radius: 999px;
}

    .step-line.active {
        background: rgba(59, 130, 246, .6);
    }

.postad-card {
    background: var(--mp-card);
    border: 1px solid var(--mp-border);
    border-radius: .75rem;
    padding: 1.25rem;
    box-shadow: var(--mp-shadow);
}

.postad-input {
    background: var(--mp-card);
    border: 1px solid var(--mp-border);
    color: var(--mp-fg);
}

    .postad-input:focus {
        background: var(--mp-card);
        border-color: rgba(59, 130, 246, .7);
        box-shadow: 0 0 0 .2rem rgba(59, 130, 246, .18);
        color: var(--mp-fg);
    }

.photo-slot {
    width: 150px;
    height: 150px;
    border-radius: .75rem;
    background: var(--mp-card);
    border: 1px dashed var(--mp-border);
    color: var(--mp-muted);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: 0px;
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

    .photo-slot:hover {
        transform: translateY(-3px);
        background: var(--mp-pill);
        border-color: rgba(59, 130, 246, .55);
    }

    .photo-slot.selected {
        border-style: solid;
        border-color: rgba(59, 130, 246, .75);
        background: var(--mp-pill);
    }

.photo-slot-icon {
    position: relative;
    font-size: 2.3rem;
    line-height: 1;
}

    .photo-slot-icon .plus {
        position: absolute;
        right: -15px;
        bottom: -15px;
        font-size: 1.5rem;
        opacity: .9;
    }

.photo-slot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(.75rem);
}

.photo-slot-text {
    font-size: 1.0rem;
    font-weight: 600;
    width: 100%;
    text-wrap: auto;
    padding: 5px;
    text-align: center;
}

.postad-next {
    border-radius: .625rem;
    padding-inline: 1.1rem;
}

.myads-list-card {
    border-radius: 0.625rem;
    border: 1px solid var(--mp-border);
    padding: .5rem 1rem;
    margin-top: 1rem;
    width: 100%;
}

.myads-list {
    width: 100%;
}

.myads-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
}

    .myads-row + .myads-row {
        border-top: 1px solid var(--mp-border);
    }

.myads-thumb {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 0.625rem;
    border: 1px solid var(--mp-border);
}

.advertisement-carousel {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

    .advertisement-carousel img {
        width: 100px;
        height: 100px;
        object-fit: cover;
    }

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100px;
    width: 100px;
    background-color: var(--mp-card);
    border: 1px dashed var(--mp-border);
    border-radius: 8px;
}

    .no-image-placeholder svg,
    .no-image-placeholder i {
        font-size: 3rem;
        color: var(--mp-muted);
        margin-bottom: 0.5rem;
    }

    .no-image-placeholder span {
        font-size: 0.875rem;
    }

.myads-price {
    color: #1f4fd6;
    font-weight: 700;
    line-height: 1.2;
}

.myads-icon-btn {
    width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.myads-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--mp-border);
    color: var(--mp-muted);
    font-size: 22px;
}

@media (max-width: 575.98px) {
    .myads-row {
        flex-direction: column;
        align-items: stretch;
    }

        .myads-row > div:last-child {
            justify-content: flex-start;
            flex-wrap: wrap;
        }
}

.editad-photo {
    position: relative;
    border-radius: .8rem;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
    aspect-ratio: 4/3
}

.editad-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.editad-photo-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    align-items: center;
    justify-content: center;
    background: var(--mp-overlay);
    opacity: 0;
    transition: opacity .15s ease
}

.editad-photo:hover .editad-photo-overlay {
    opacity: 1
}

/* Loading overlay for image processing */
.editad-photo-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10;
}

.editad-photo.processing {
    pointer-events: none;
    opacity: 0.9;
}

    .editad-photo.processing .editad-photo-overlay {
        opacity: 0 !important;
    }

.editad-preview {
    display: flex;
    gap: .75rem;
    align-items: center;
    background: var(--mp-card);
    border: 1px solid var(--mp-border);
    border-radius: .8rem;
    padding: .75rem
}

.editad-preview-img {
    width: 76px;
    height: 60px;
    object-fit: cover;
    border-radius: .6rem;
    border: 1px solid var(--mp-border)
}

.ad-card {
    background: var(--mp-card);
    border: 1px solid var(--mp-border);
    border-radius: .625rem;
    box-shadow: var(--mp-shadow);
    padding: 1rem
}

.ad-hr {
    border-color: var(--mp-border)
}

.ad-gallery {
    display: grid;
    gap: .75rem
}

.ad-main {
    position: relative;
    border-radius: .625rem;
    overflow: hidden;
    border: 1px solid var(--mp-border);
    background: var(--mp-card);
    cursor: zoom-in
}

.ad-main-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4/3;
    object-fit: cover
}

@media (max-width: 991px) {
    .ad-main {
        cursor: default
    }
}

.ad-thumbs {
    display: flex;
    gap: .5rem;
    overflow: auto;
    padding-bottom: .25rem
}

.ad-thumb {
    border: 1px solid var(--mp-border);
    background: var(--mp-card);
    border-radius: .625rem;
    padding: 0;
    width: 72px;
    height: 54px;
    flex: 0 0 auto;
    overflow: hidden
}

    .ad-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        opacity: .9
    }

    .ad-thumb.active {
        outline: 2px solid var(--bs-primary);
        border-color: var(--bs-primary)
    }

.ad-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mp-pill);
    border: 1px var(--mp-border);
    color: var(--mp-fg);
}

.ad-desc {
    white-space: pre-wrap;
    line-height: 1.5;
}

.audit-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
}

    .audit-row + .audit-row {
        border-top: 1px solid rgba(0, 0, 0, 0.08);
    }

.audit-dot {
    width: 36px;
    height: 36px;
    border-radius: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--mp-border);
    color: var(--mp-fg);
    background: var(--mp-pill);
    flex: 0 0 auto;
}

.myads-stat-card {
    border-radius: 0.625rem;
    border: 1px solid var(--mp-border);
}

.myads-list-card {
    border-radius: 0.625rem;
    border: 1px solid var(--mp-border);
}

.myads-icon-btn {
    width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.myads-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--mp-border);
    color: var(--mp-fg);
    font-size: 22px;
}

@media (max-width: 575.98px) {
    .audit-row {
        flex-direction: column;
        align-items: stretch;
    }
}
