/* ────────────────────────────────────────────
   WC Discount Popup v2.0 - Styles
   ──────────────────────────────────────────── */

.discount-popup {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 320px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    padding: 0;
    z-index: 99999;
    font-family: 'IRANSansX', 'Vazirmatn', Tahoma, sans-serif;
    direction: rtl;
    overflow: hidden;
    animation: popupSlideIn 0.4s ease;
}

@keyframes popupSlideIn {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ─── سربرگ رنگی ─── */
.discount-popup::before {
    content: '';
    display: block;
    height: 6px;
    background: linear-gradient(90deg, #c90063, #ff6b9d);
}

.popup-content {
    padding: 20px 20px 18px;
    position: relative;
    text-align: center;
}

/* ─── آیکون ─── */
.popup-icon {
    font-size: 36px;
    margin-bottom: 6px;
    line-height: 1;
}

/* ─── عنوان ─── */
.popup-content h3 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 900;
    color: #222;
}

/* ─── پیام سفارشی ─── */
.popup-message {
    background: linear-gradient(135deg, #fff0f6, #ffeaf5);
    border: 1px solid #f0a0c8;
    border-radius: 8px;
    color: #c90063;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 12px;
    margin: 0 0 12px;
    text-align: center;
}

/* ─── جعبه کد ─── */
.code-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4px 0 10px;
    background: #f5f5f5;
    border: 2px dashed #ccc;
    padding: 10px 12px;
    border-radius: 8px;
    gap: 8px;
}

#discount-code {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 2px;
    color: #1a1a1a;
    flex: 1;
    text-align: center;
    font-family: 'Courier New', monospace;
}

#copy-code {
    background: #c90063;
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'IRANSansX', Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 700;
    transition: background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

#copy-code:hover {
    background: #a0004e;
}

/* ─── تایمر ─── */
.timer-text {
    margin: 0;
    color: #c90063;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

#countdown {
    font-size: 15px;
    font-weight: 900;
    margin-right: 4px;
}

/* ─── دکمه بستن ─── */
.close-btn {
    position: absolute;
    top: 8px;
    left: 10px;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #999;
    transition: color 0.2s;
    background: none;
    border: none;
    padding: 2px 6px;
    border-radius: 4px;
}

.close-btn:hover {
    color: #c90063;
    background: #ffeaf5;
}

/* ─── موبایل ─── */
@media (max-width: 480px) {
    .discount-popup {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        max-width: 340px;
    }
}
