/* User-supplied brand font (IRANSansWeb / font_nbt.ttf) — used site-wide, replacing the
   previous IRANYekanX font. */
@font-face {
    font-family: "IRANSansWeb";
    font-style: normal;
    font-weight: normal;
    src: url("/fonts/IRANSansWeb.ttf") format("truetype");
    font-display: swap;
}

html, body {
    font-family: "IRANSansWeb", Tahoma, sans-serif;
}

/* Simple fallbacks for icon-frame placeholders (no icon library ported) */
.icon-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.icon-frame-square {
    border-radius: 9999px;
    background: var(--bg-tertiary, #f4f4f5);
    width: 40px;
    height: 40px;
}

/* Mobile nav toggle (plain JS, no React) */
.mobile-nav-hidden {
    display: none;
}

/* Homepage hero slider (Lamari / Phoenix cars) */
.hero-slider-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

.hero-slide {
    position: relative;
    inset: unset;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: block;
}

.hero-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: #111;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.hero-slider-arrow:hover {
    background: #fff;
}

.hero-slider-prev {
    right: 12px;
}

.hero-slider-next {
    left: 12px;
}

.hero-slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 8px;
}

.hero-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
}

.hero-slider-dot.is-active {
    background: #fff;
    width: 20px;
    border-radius: 9999px;
}

/* Admin price-edit panel (/admin/login, /admin/products) — minimal, discreet, matching the
   site's own utility-class look rather than pulling in a separate UI framework. */
.admin-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.admin-alert-danger {
    background: #fdecec;
    color: #b3261e;
    border: 1px solid #f5c2c0;
}

.admin-alert-success {
    background: #e7f6ec;
    color: #1e7a3c;
    border: 1px solid #bfe8cd;
}

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border-secondary, #e5e5e5);
    border-radius: 12px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: right;
    white-space: nowrap;
    border-bottom: 1px solid var(--border-secondary, #e5e5e5);
}

.admin-table thead th {
    font-weight: 600;
    color: var(--text-secondary, #444);
    background: var(--bg-tertiary, #f4f4f5);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table-price {
    font-weight: 700;
}

.admin-price-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-price-input {
    width: 130px;
}

.admin-header-row {
    flex-wrap: wrap;
    gap: 12px;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-badge-manual {
    background: var(--bg-tertiary, #f4f4f5);
    color: var(--text-secondary, #555);
}

.admin-badge-auto {
    background: #e7f6ec;
    color: #1e7a3c;
}

/* Live progress panel for the "بروزرسانی خودکار قیمت‌ها از ترب" button
   (Controllers/AdminProductsController.cs AutoUpdatePriceStream, an SSE endpoint). */
.admin-progress-panel {
    border: 1px solid var(--border-secondary, #e5e5e5);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: var(--bg-secondary, #fafafa);
}

.admin-progress-summary {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.admin-progress-log {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 240px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-progress-item {
    font-size: 0.8125rem;
    padding: 4px 10px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--border-secondary, #e5e5e5);
}

.admin-progress-updated {
    color: #1e7a3c;
}

.admin-progress-not-found,
.admin-progress-skipped {
    color: var(--text-secondary, #666);
}

.admin-progress-error {
    color: #b3261e;
}

/* Discreet admin footer link — small, low-contrast, tucked in with the legal links. */
.admin-footer-link {
    font-size: 0.7rem;
    color: var(--text-quaternary, #999);
    opacity: 0.7;
    text-decoration: none;
}

.admin-footer-link:hover {
    opacity: 1;
    text-decoration: underline;
}
