/* ============================== */
/* === Global & Container      === */
/* ============================== */
.mcb-promo-codes-block * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.mcb-promo-codes-block {
    max-width: 800px;
    margin: 0 auto 20px;
    padding: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================== */
/* === Fix: бейдж не перекрывает === */
/* ============================== */
.mcb-promo-codes-block .coupon-card {
    padding-top: 32px !important;
}

.mcb-promo-codes-block .savings-badge {
    top: -16px !important;
}

/* ============================== */
/* === Header section          === */
/* ============================== */
.mcb-promo-codes-block .promo-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #ff4747 0%, #ff6b00 100%);
    border-radius: 10px;
    color: white;
}

.mcb-promo-codes-block .promo-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.mcb-promo-codes-block .promo-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ============================== */
/* === Filters                 === */
/* ============================== */
.mcb-promo-codes-block .filters-section {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.mcb-promo-codes-block .filter-btn {
    padding: 6px 16px;
    background: white;
    border: 2px solid #e0e6ed;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.mcb-promo-codes-block .filter-btn:hover:not(:disabled) {
    border-color: #ff4747;
    color: #ff4747;
}

.mcb-promo-codes-block .filter-btn.active {
    background: #ff4747;
    color: white;
    border-color: #ff4747;
}

.mcb-promo-codes-block .filter-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* ============================== */
/* === Campaign section        === */
/* ============================== */
.mcb-promo-codes-block .campaign {
    margin-bottom: 15px;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.mcb-promo-codes-block .campaign-header {
    text-align: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.mcb-promo-codes-block .campaign-date {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mcb-promo-codes-block .campaign-badge {
    background: #ff4747;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.mcb-promo-codes-block .campaign-note {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

/* Progress bar */
.mcb-promo-codes-block .time-progress {
    margin-top: 8px;
    background: #ffe0e0;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.mcb-promo-codes-block .time-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #ff4747 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
    position: relative;
}

.mcb-promo-codes-block .time-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    animation: mcb-promo-shine 2s infinite;
}

@keyframes mcb-promo-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.mcb-promo-codes-block .time-left {
    font-size: 0.7rem;
    color: #ff4747;
    margin-top: 4px;
    font-weight: 600;
}

/* ============================== */
/* === Coupons grid & cards    === */
/* ============================== */
.mcb-promo-codes-block .coupons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

@media (min-width: 640px) {
    .mcb-promo-codes-block .coupons-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.mcb-promo-codes-block .coupon-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #e8e8e8;
    transition: all 0.2s;
    position: relative;
}

.mcb-promo-codes-block .coupon-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border-color: #ff4747;
}

.mcb-promo-codes-block .coupon-card.hot::after {
    content: '🔥';
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.8rem;
}

.mcb-promo-codes-block .discount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ff4747;
    line-height: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
}

.mcb-promo-codes-block .discount-prefix {
    font-size: 0.9rem;
    font-weight: 600;
}

.mcb-promo-codes-block .threshold {
    font-size: 0.75rem;
    color: #666;
    margin: 2px 0 6px;
}

.mcb-promo-codes-block .savings-badge {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 1px 6px;
    border-radius: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 2px;
}

.mcb-promo-codes-block .coupon-code {
    background: white;
    border: 1px dashed #d0d0d0;
    border-radius: 4px;
    padding: 4px 6px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.mcb-promo-codes-block .copy-hint {
    font-size: 0.65rem;
    color: #999;
    margin-top: 3px;
    opacity: 0;
    transition: opacity 0.2s;
}

.mcb-promo-codes-block .coupon-card:hover .copy-hint {
    opacity: 1;
}

/* ============================== */
/* === Tooltip notification    === */
/* ============================== */
.mcb-promo-codes-block .copy-tooltip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(10px);
    background: #4CAF50;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 3px 15px rgba(76,175,80,0.3);
    transition: all 0.3s;
    z-index: 50;
}

.mcb-promo-codes-block .copy-tooltip.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================== */
/* === Mobile tweaks           === */
/* ============================== */
@media (max-width: 640px) {
    .mcb-promo-codes-block .promo-title {
        font-size: 1.2rem;
    }
    .mcb-promo-codes-block .promo-subtitle {
        font-size: 0.85rem;
    }
    .mcb-promo-codes-block .coupons-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .mcb-promo-codes-block .discount {
        font-size: 1.2rem;
    }
    .mcb-promo-codes-block .coupon-code {
        font-size: 0.75rem;
    }
}
