/* ============================================================
   Promotions Page Styles
   ============================================================ */

/* ── Stats Bar ── */
.promo-stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.promo-stat-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 16px;
    border: 1px solid var(--border-s);
    border-radius: var(--radius-s);
    background: var(--surface);
    box-shadow: none;
    min-width: 64px;
    transition: border-color var(--transition), background var(--transition);
}

.promo-stat-chip:hover {
    background: var(--surface-2);
    border-color: var(--border);
    transform: none;
    box-shadow: none;
}

.chip-value {
    font-size: var(--fs-2xl);
    font-weight: 700;
    line-height: 1;
}

.chip-label {
    font-size: var(--fs-xs);
    color: var(--text-3);
    white-space: nowrap;
}

/* ── Modal ── */
.promo-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.promo-modal-content {
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.promo-modal-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.promo-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.promo-form-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-2);
}

.promo-auto-hide-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 12px;
    background: var(--surface-2);
    border-radius: var(--radius-s);
    border: 1px solid var(--border-s);
}

.promo-auto-hide-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
}

.promo-auto-hide-label input[type="checkbox"] {
    width: auto;
}

.promo-dates-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.promo-image-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.promo-image-preview {
    margin-top: 6px;
}

/* ── Table Cells ── */
.promo-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-s);
    border: 1px solid var(--border-s);
    display: block;
}

.promo-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 48px;
    background: var(--surface-2);
    border: 1px dashed var(--border-s);
    border-radius: var(--radius-s);
    color: var(--text-3);
    font-size: var(--fs-lg);
}

.promo-title-name {
    font-weight: 600;
    color: var(--text-1);
    font-size: var(--fs-base);
}

.promo-title-desc {
    font-size: var(--fs-xs);
    color: var(--text-3);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.promo-title-link {
    font-size: var(--fs-xs);
    color: var(--primary);
    margin-top: 3px;
}

.promo-timing {
    font-size: var(--fs-xs);
    color: var(--text-2);
    line-height: 1.6;
}

.promo-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── Modal Grid ── */
#promoModal .modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}

#promoModal .form-group[style*="grid-column:1/-1"],
#promoModal .form-group:has(#f-title),
#promoModal .form-group:has(#f-desc),
#promoModal .form-group:has(#f-image-file),
#promoModal .form-group:has(#f-terms),
#promoModal .form-group:has(#f-featured),
#promoModal #field-auto {
    grid-column: 1 / -1;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    .promo-stats-bar {
        gap: 6px;
    }

    .promo-stat-chip {
        padding: 6px 12px;
        min-width: 52px;
    }

    .chip-value {
        font-size: var(--fs-xl);
    }

    #promoModal .modal-body {
        grid-template-columns: 1fr;
    }

    .promo-thumb,
    .promo-thumb-empty {
        width: 48px;
        height: 36px;
    }
}