/* ===========================
   استایل فرانت‌اند - دکمه پرداخت
   =========================== */

.dcb-wrapper {
    font-family: dana, roboto, Arial !important;
    direction: rtl;
    max-width: 100% !important;
    margin: 20px 0;
    width: 100%;
}

/* متن فوریت */
.dcb-urgency {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #fef3c7, #fffbeb);
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 12px;
    animation: dcb-urgency-flash 2s infinite;
    width: 100%;
    box-sizing: border-box;
}

@keyframes dcb-urgency-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.dcb-urgency-icon {
    display: flex;
    align-items: center;
    color: #d97706;
}

.dcb-clock-icon {
    color: #d97706;
}

.dcb-clock-hand-minute {
    animation: dcb-clock-spin 3s linear infinite;
    transform-origin: 12px 12px;
}

.dcb-clock-hand-hour {
    animation: dcb-clock-spin 36s linear infinite;
    transform-origin: 12px 12px;
}

@keyframes dcb-clock-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.dcb-urgency-text {
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
}

/* ===== دکمه اصلی ===== */
.dcb-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-family: dana, roboto, Arial !important;
    font-weight: 700;
    transition: all 0.3s ease;
    overflow: hidden;
    text-decoration: none;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
    padding: 18px 36px;
    font-size: 17px;
}

.dcb-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.dcb-button:hover::before {
    left: 100%;
}

.dcb-button:active {
    transform: scale(0.97);
}

/* کلاس مخصوص تمام عرض - برای اطمینان بیشتر */
.dcb-btn-fullwidth {
    width: 100% !important;
    max-width: 100% !important;
}

/* تم‌های رنگی */
.dcb-theme-green {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}
.dcb-theme-green:hover {
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.5);
    transform: translateY(-2px);
}

.dcb-theme-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}
.dcb-theme-red:hover {
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.5);
    transform: translateY(-2px);
}

.dcb-theme-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.dcb-theme-blue:hover {
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

.dcb-theme-purple {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    color: #fff;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}
.dcb-theme-purple:hover {
    box-shadow: 0 6px 25px rgba(168, 85, 247, 0.5);
    transform: translateY(-2px);
}

.dcb-theme-orange {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
}
.dcb-theme-orange:hover {
    box-shadow: 0 6px 25px rgba(249, 115, 22, 0.5);
    transform: translateY(-2px);
}

/* دکمه غیرفعال */
.dcb-theme-disabled {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    color: #e2e8f0;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.85;
}
.dcb-theme-disabled:hover {
    transform: none;
    box-shadow: none;
}
.dcb-theme-disabled::before {
    display: none;
}

/* بخش‌های داخل دکمه */
.dcb-btn-icon {
    font-size: 1.3em;
    flex-shrink: 0;
}

.dcb-btn-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.dcb-btn-text {
    font-weight: 700;
}

.dcb-btn-price {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
}

.dcb-strikethrough {
    text-decoration: line-through;
    opacity: 0.7;
    font-size: 0.85em;
}

.dcb-discounted-price {
    font-weight: 800;
    font-size: 1.1em;
}

.dcb-free-badge {
    background: rgba(255,255,255,0.3);
    padding: 2px 12px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 1.1em;
}

.dcb-discount-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    background: #fbbf24;
    color: #78350f;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 0 0 10px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* ===== انیمیشن‌ها ===== */
.dcb-anim-pulse {
    animation: dcb-pulse 2s ease-in-out infinite;
}
@keyframes dcb-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.dcb-anim-shake {
    animation: dcb-shake 3s ease-in-out infinite;
}
@keyframes dcb-shake {
    0%, 100% { transform: translateX(0); }
    10% { transform: translateX(-4px); }
    20% { transform: translateX(4px); }
    30% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    50%, 100% { transform: translateX(0); }
}

.dcb-anim-bounce {
    animation: dcb-bounce 2s ease infinite;
}
@keyframes dcb-bounce {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
    50% { transform: translateY(0); }
    70% { transform: translateY(-3px); }
}

.dcb-anim-glow {
    animation: dcb-glow 2s ease-in-out infinite;
}
@keyframes dcb-glow {
    0%, 100% { box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
    50% { box-shadow: 0 4px 30px rgba(0,0,0,0.35), 0 0 20px rgba(255,255,255,0.15); }
}

.dcb-anim-swing {
    animation: dcb-swing 2.5s ease-in-out infinite;
}
@keyframes dcb-swing {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(1.5deg); }
    40% { transform: rotate(-1.5deg); }
    60% { transform: rotate(0.8deg); }
    80% { transform: rotate(-0.8deg); }
}

/* ===== بخش صرفه‌جویی ===== */
.dcb-savings {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 12px;
    width: 100%;
    box-sizing: border-box;
}

.dcb-free-notice {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #93c5fd;
}

.dcb-savings-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dcb-savings-icon {
    font-size: 20px;
}

.dcb-savings-text {
    font-size: 13px;
    color: #166534;
    line-height: 1.6;
}

.dcb-free-notice .dcb-savings-text {
    color: #1e40af;
}

.dcb-savings-bar {
    height: 6px;
    background: #d1fae5;
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.dcb-savings-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 3px;
    transition: width 1s ease;
    animation: dcb-bar-shine 2s ease infinite;
}

@keyframes dcb-bar-shine {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.8; }
}

/* ===== محصول جایگزین (فرانت) ===== */
.dcb-alt-product {
    margin-top: 16px;
    width: 100%;
}

.dcb-alt-label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 10px;
}

.dcb-alt-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.dcb-alt-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.dcb-alt-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.dcb-alt-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.dcb-alt-name {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
}

.dcb-alt-price {
    font-size: 13px;
    color: #22c55e;
    font-weight: 600;
}

.dcb-alt-arrow {
    font-size: 24px;
    color: #667eea;
    transition: transform 0.3s;
}

.dcb-alt-card:hover .dcb-alt-arrow {
    transform: translateX(-4px);
}

/* ===== لودینگ ===== */
.dcb-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    color: #64748b;
    font-size: 13px;
}

.dcb-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: dcb-spin 0.8s linear infinite;
}

@keyframes dcb-spin {
    to { transform: rotate(360deg); }
}

/* ===== ریسپانسیو ===== */
@media (max-width: 480px) {
    .dcb-wrapper {
        max-width: 100% !important;
    }
}