/* --- POPUP WRAPPER & OVERLAY --- */
.sip-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 999999;
    display: none; 
    justify-content: center; align-items: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.sip-overlay {
    position: absolute; width: 100%; height: 100%;
    background: var(--sip-overlay-bg) !important;
    backdrop-filter: blur(var(--sip-overlay-blur)) !important;
    -webkit-backdrop-filter: blur(var(--sip-overlay-blur)) !important;
    transform: translate3d(0,0,0);
    -webkit-transform: translate3d(0,0,0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: backdrop-filter, opacity;
}

/* --- CARD STYLING --- */
.sip-embed-container, .sip-modal {
    position: relative; z-index: 10000;
    background: #ffffff;
    width: 90%; max-width: 450px; 
    margin: 20px auto; 
    border: 1px solid #e2e8f0; border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1); 
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- HEADER --- */
.sip-header { 
    background-color: var(--sip-header) !important; 
    padding: 20px 25px; 
}
.sip-header h3 { 
    margin: 0 0 5px; font-size: 20px; font-weight: 700; line-height:1.2;
    color: var(--sip-title-c) !important; 
}
.sip-header p { 
    margin: 0; font-size: 14px; opacity: 0.9;
    color: var(--sip-desc-c) !important;
}

.sip-body { padding: 25px; }

/* Extra Title */
.sip-extra-title {
    text-align: center; font-weight: 700; font-size: 18px; margin-bottom: 15px; text-transform: uppercase;
}

/* Form Fields */
.sip-input-group {
    display: flex; align-items: center;
    border: 2px solid #e2e8f0; border-radius: 8px;
    padding: 2px 12px; margin-bottom: 15px;
    transition: border-color 0.2s; background: #fff;
}
.sip-input-group:focus-within { border-color: var(--sip-btn); }
.sip-prefix { font-weight: 600; color: #64748b; margin-right: 12px; font-size: 16px; }

.sip-form input, .sip-form select, .sip-form textarea {
    border: none; background: transparent; width: 100%;
    padding: 12px 0; font-size: 16px; outline: none; color: #1e293b;
    font-family: inherit;
}
.sip-form textarea { resize:vertical; min-height:60px; }

/* --- UNIFIED OFFER BOX --- */
.sip-offer-placeholder { display: none; margin-bottom: 15px; }

.sip-offer-box {
    background: #fff8f8;
    border: 2px dashed #ffcccc;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    animation: sipFadeIn 0.3s ease-out;
}

/* Timer in Box */
.sip-timer-wrap {
    margin-bottom: 8px;
}
.sip-timer-title { font-size: 12px; font-weight: 600; text-transform: uppercase; color: #d63638; margin-bottom:2px; }
.sip-timer-clock { font-size: 22px; font-weight: 800; color: #d63638; line-height: 1; }

/* Coupon in Box */
.sip-coupon-section {
    border-top: 1px solid #ffebeb;
    padding-top: 8px;
}
.sip-coupon-label { font-size: 12px; font-weight: 600; text-transform: uppercase; color: #555; display:block; margin-bottom:4px; }

.sip-coupon-code-wrap {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid #ddd;
    padding: 6px 12px; border-radius: 4px;
    cursor: pointer; transition: transform 0.1s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.sip-coupon-code-wrap:active { transform: scale(0.96); }
.sip-coupon-code { font-weight: 800; font-size: 16px; letter-spacing: 0.5px; color: #333; }
.sip-copy-hint { font-size: 10px; opacity: 0.6; font-style: italic; }

.sip-coupon-code-wrap.success-mode {
    background: #f0fdf4; border-color: #bbf7d0; color: #166534;
    margin-top: 10px; display: inline-flex;
}

/* Verification Error Box */
.sip-verification-error {
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #dc2626;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    font-weight: 500;
    margin-bottom: 10px;
    animation: sipFadeIn 0.3s ease-out;
}

/* Primary Button */
.sip-submit-btn {
    width: 100%; 
    background-color: var(--sip-btn) !important; 
    color: var(--sip-btn-t-c) !important;
    border: none; padding: 14px; border-radius: 8px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    display: flex; justify-content: center; align-items: center; transition: opacity 0.2s, background 0.2s;
}
.sip-submit-btn:hover { opacity: 0.9; }
.sip-submit-btn:disabled { 
    opacity: 0.6; cursor: not-allowed; 
    background-color: #ccc !important; color: #666 !important;
}

/* Close Button */
.sip-close-btn {
    display: block; width: 100%;
    background-color: var(--sip-close-bg, transparent) !important;
    color: var(--sip-close, #64748b) !important;
    border: none !important;
    padding: 10px; margin-top: 10px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    border-radius: 8px; transition: opacity 0.2s;
}
.sip-close-btn:hover { opacity: 0.8; }

.sip-message { font-size: 13px; margin-bottom: 10px; min-height: 5px; }
.sip-message.error { color: #dc2626; }
.sip-success-container { text-align: center; padding: 20px; color: #059669; font-weight: 600; }

@keyframes sipSlideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes sipFadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }