/* Coupon Modal CSS - Separate stylesheet */

.toast-msg {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: #1e293b; color: #fff; padding: 12px 24px; border-radius: 8px;
    font-size: .9rem; font-weight: 600; z-index: 9999; opacity: 0;
    transition: opacity .3s; pointer-events: none;
}
.toast-msg.show { opacity: 1; }

/* Modal */
.coupon-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5); z-index: 1000; justify-content: center;
    align-items: center; overflow-y: auto; overflow-x: hidden; padding: 20px;
}
.coupon-modal-overlay.active { display: flex; }

.coupon-modal {
    background: #fff; border-radius: 14px; max-width: 420px;
    width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden; animation: slideUp .2s ease-out; position: relative;
    max-height: 85vh; display: flex; flex-direction: column;
}

@keyframes slideUp {
    from { transform: translateY(24px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.coupon-modal-close {
    position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.08);
    border: none; font-size: 1rem; cursor: pointer; color: #555;
    transition: all .2s; z-index: 100;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; min-width: 30px;
}
.coupon-modal-close:hover { background: #ef4444; color: #fff; transform: rotate(90deg); }

.coupon-modal-content {
    display: block; padding: 20px 18px 16px;
    position: relative; overflow-y: auto; flex: 1;
    scrollbar-width: thin; scrollbar-color: #e2e8f0 transparent;
}
.coupon-modal-content::-webkit-scrollbar { width: 4px; }
.coupon-modal-content::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

.coupon-detail-card { display: flex; flex-direction: column; gap: 10px; }

/* Hide right section */
.coupon-modal-right { display: none; }

/* Header: icon + name side by side */
.coupon-detail-header {
    display: flex; gap: 10px; align-items: center;
    padding-bottom: 10px; border-bottom: 1px solid #f1f5f9;
}

.coupon-detail-icon {
    min-width: 44px; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 10px; color: #fff; flex-shrink: 0; font-size: 1.4rem;
}

.coupon-detail-title { flex: 1; }

.coupon-detail-title h3 {
    font-size: 1rem; font-weight: 800; margin: 0; color: #1e293b; line-height: 1.3;
}

.coupon-detail-title p { display: none; }

/* Discount badge */
.coupon-discount-big {
    text-align: center; padding: 10px 12px; background: #f0fdf4;
    border-radius: 8px; border-left: 3px solid #16a34a;
}

.coupon-discount-big-label {
    font-size: .68rem; color: #16a34a; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px;
}

.coupon-discount-big-value {
    font-size: clamp(.9rem, 3.5vw, 1.25rem); font-weight: 800; color: #15803d;
    line-height: 1.3; word-break: break-word;
}

.coupon-discount-big-desc {
    font-size: .82rem; color: #1e293b; font-weight: 600; margin-top: 6px;
}

/* Info rows */
.coupon-detail-info { display: flex; flex-direction: column; gap: 0; }

.coupon-detail-info-row {
    display: flex; gap: 8px; font-size: .82rem;
    padding: 7px 0; align-items: flex-start;
    border-bottom: 1px solid #f8fafc;
}
.coupon-detail-info-row:last-child { border-bottom: none; }

.coupon-detail-info-label {
    font-size: .75rem; font-weight: 700; color: #64748b; min-width: 72px; padding-top: 1px;
}

.coupon-detail-info-value {
    font-size: .82rem; color: #334155; line-height: 1.55; font-weight: 500; flex: 1;
}

.coupon-detail-info-value a { color: #3b82f6; text-decoration: none; font-weight: 600; }
.coupon-detail-info-value a:hover { text-decoration: underline; }

/* Sticky action bar */
.coupon-detail-actions {
    display: flex; flex-direction: row; gap: 8px; padding: 12px 18px 14px;
    border-top: 1px solid #f1f5f9; justify-content: stretch;
    position: sticky; bottom: 0; background: #fff; z-index: 1;
}

.coupon-detail-actions .coupon-btn {
    flex: 1; padding: 11px 10px; font-size: .8rem; border: none;
    border-radius: 8px; cursor: pointer; font-weight: 700;
    transition: background .2s, transform .1s; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    text-align: center;
}
.coupon-detail-actions .coupon-btn:active { transform: scale(.97); }

.coupon-detail-actions .coupon-btn-primary { background: #FF9900; color: #fff; }
.coupon-detail-actions .coupon-btn-primary:hover { background: #ff8c00; }

.coupon-detail-actions .coupon-btn-copy { background: #16a34a; color: #fff; }
.coupon-detail-actions .coupon-btn-copy:hover { background: #15803d; }

.coupon-detail-actions .coupon-btn-close { background: #f1f5f9; color: #475569; flex: 0 0 auto; padding: 11px 16px; }
.coupon-detail-actions .coupon-btn-close:hover { background: #e2e8f0; }

.coupon-detail-actions .coupon-btn-claim { background: #ee4d2d; color: #fff; }
.coupon-detail-actions .coupon-btn-claim:hover { background: #d44427; }

/* Responsive */
@media (max-width: 480px) {
    .coupon-modal-overlay {
        padding: 12px;
        align-items: center;
        justify-content: center;
    }
    .coupon-modal {
        max-width: 100%;
        border-radius: 14px;
        max-height: 90vh;
        margin: 0 auto;
    }
    .coupon-detail-actions .coupon-btn-close { flex: 0 0 auto; padding: 11px 14px; }
}
