/* =========================================
   NikAmooz WC Pricing — Scarcity Badge
   Minimal, beautiful, conversion-focused
   ========================================= */

.wcp-flash-badge {
    margin: 16px 0 20px;
    padding: 18px 20px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid #e8e8e8;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    font-family: inherit;
    transition: border-color 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Urgency level border accents */
.wcp-flash-badge.wcp-urgency-normal   { border-color: #4f46e5; }
.wcp-flash-badge.wcp-urgency-high     { border-color: #f59e0b; }
.wcp-flash-badge.wcp-urgency-critical { border-color: #ef4444; }

/* ---- Header ---- */
.wcp-badge-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.wcp-badge-flame {
    font-size: 18px;
    animation: wcp-pulse 1.6s ease-in-out infinite;
}

.wcp-badge-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #4f46e5;
}

.wcp-urgency-high     .wcp-badge-label { color: #d97706; }
.wcp-urgency-critical .wcp-badge-label { color: #dc2626; }

/* ---- Price row ---- */
.wcp-price-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.wcp-flash-price {
    font-size: 24px;
    font-weight: 800;
    color: #111;
    line-height: 1;
}

.wcp-flash-price .woocommerce-Price-amount {
    color: inherit;
}

.wcp-regular-price {
    font-size: 15px;
    color: #9ca3af;
    text-decoration: line-through;
}

/* ---- Progress bar ---- */
.wcp-quota-bar-wrap {
    width: 100%;
    height: 8px;
    background: #f3f4f6;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 10px;
}

.wcp-quota-bar {
    height: 100%;
    width: var(--wcp-sold-percent, 0%);
    border-radius: 99px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.wcp-urgency-high     .wcp-quota-bar { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.wcp-urgency-critical .wcp-quota-bar { background: linear-gradient(90deg, #ef4444, #b91c1c); }

/* ---- Urgency text ---- */
.wcp-urgency-text {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.wcp-urgency-text.wcp-urgency-high     { color: #b45309; }
.wcp-urgency-text.wcp-urgency-critical { color: #b91c1c; }
/* ============================================================
   Cart line-item price display (CartDisplay.php)
   ============================================================ */

.wcp-cart-price-wrap,
.wcp-cart-subtotal-wrap {
    display:        flex;
    flex-direction: column;
    gap:            2px;
    line-height:    1.3;
}

/* خط‌خورده قیمت اصلی */
.wcp-cart-regular-price {
    color:           #999;
    font-size:       0.82em;
    text-decoration: line-through;
}

/* قیمت فلش */
.wcp-cart-flash-price {
    color:       #c0392b;
    font-weight: 700;
    font-style:  normal
}

/* تعداد باقی‌مانده – pill کوچک */
.wcp-cart-remaining {
    display:          inline-block;
    font-size:        0.72em;
    color:            #fff;
    background:       #e67e22;
    border-radius:    9999px;
    padding:          1px 7px;
    font-weight:      600;
    letter-spacing:   0.02em;
    white-space:      nowrap;
    align-self:       flex-start;
}

/* ---- Animation ---- */
@keyframes wcp-pulse {
    0%, 100% { transform: scale(1);    opacity: 1;    }
    50%       { transform: scale(1.2); opacity: 0.85; }
}


/* ============================================================
   Compact Badge –
   ============================================================ */

.wcp-flash-badge--compact {
    width:         100%;
    background:    #2d2d2d;
    border-radius: 10px;
    padding:       14px 16px;
    margin-bottom: 16px;
    box-shadow:    0 2px 12px rgba(0,0,0,.25);
    color:         #f0f0f0;
    font-family:   inherit;
    box-sizing:    border-box;
}

/* Header – آیکون + لیبل تخفیف */
.wcp-flash-badge--compact .wcp-badge-header {
    display:        flex;
    align-items:    center;
    gap:            6px;
    margin-bottom:  10px;
}

.wcp-flash-badge--compact .wcp-badge-label {
    font-size:   0.78em;
    font-weight: 600;
    color:       #a8e6cf;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.wcp-flash-badge--compact .wcp-badge-flame {
    font-size: 0.9em;
}

/* Price row */
.wcp-flash-badge--compact .wcp-price-row {
    display:        flex;
    align-items:    baseline;
    gap:            10px;
    margin-bottom:  10px;
    flex-wrap:      wrap;
}

.wcp-flash-badge--compact .wcp-flash-price {
    font-size:   1.3em;
    font-weight: 700;
    color:       #ffffff;
    line-height: 1;
}

.wcp-flash-badge--compact .wcp-regular-price {
    font-size:       0.82em;
    color:           #888;
    text-decoration: line-through;
}

/* Progress bar */
.wcp-flash-badge--compact .wcp-quota-bar-wrap {
    background:    #444;
    border-radius: 9999px;
    height:        5px;
    overflow:      hidden;
    margin-bottom: 7px;
}

.wcp-flash-badge--compact .wcp-quota-bar {
    height:        100%;
    border-radius: 9999px;
    background:    linear-gradient(90deg, #a8e6cf 0%, #56c596 100%);
    width:         calc( var(--wcp-sold-percent, 0%) );
    transition:    width .4s ease;
}

/* Urgency message */
.wcp-flash-badge--compact .wcp-urgency-msg {
    font-size:  0.72em;
    color:      #bbb;
    text-align: right;
}

/* urgency رنگ‌بندی در حالت compact */
.wcp-flash-badge--compact.wcp-urgency-low .wcp-quota-bar {
    background: linear-gradient(90deg, #ff6b6b 0%, #ee5a24 100%);
}

.wcp-flash-badge--compact.wcp-urgency-low .wcp-urgency-msg {
    color: #ff6b6b;
}

.wcp-flash-badge--compact.wcp-urgency-medium .wcp-quota-bar {
    background: linear-gradient(90deg, #ffd32a 0%, #f79f1f 100%);
}

/* ── Flash Sale Info Grid ─────────────────────────── */
.wcp-flash-info-grid {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   8px 16px;
}

.wcp-flash-info-row {
    display:     flex;
    align-items: center;
    flex-direction: column;
}

.wcp-strikethrough {
    text-decoration: line-through;
    opacity:         0.55;
}
.wcp-strikethrough .woocommerce-Price-currencySymbol {
    display: none;
}
