:root {
    --wvc-sidebar: #0f1014;
    --wvc-card: #1a1b1f;
    --wvc-text-on-dark: #fff;
    --wvc-primary: #000;
    --wvc-green: #0ba468;
    --wvc-green-light: #e5f6ee;
    --wvc-border: #eaeaea;
    --wvc-bg: #fff;
}

#wvc-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 999999;
    display: none; align-items: center; justify-content: center;
}

#wvc-modal {
    display: flex; width: 1000px; max-width: 95%; height: 600px; max-height: 90vh;
    background-image:url("https://ekomx.com/uploads/checkout.svg"); border-radius: 1rem; overflow: hidden;
    font-family: "Inter", sans-serif;
	font-weight:400;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

/* SIDEBAR (Dark) */
.wvc-magic-sidebar {
    width: 280px;  color: #fff;
    display: flex; flex-direction: column; flex-shrink: 0;
}
.wvc-mobile-header { display: none; } /* Mobile toggle hidden on desktop */

.wvc-sidebar-content { padding: 24px; display: flex; flex-direction: column; height: 100%; box-sizing: border-box; }

.wvc-brand-desktop { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; }
.wvc-brand-icon { width: 32px; height: 32px; background: #fff; color: #000; font-weight: 800; display: flex; align-items: center; justify-content: center; border-radius: 4px; }
.wvc-brand-name { font-weight: 600; font-size: 16px; }
/* UPI info line */
.upi-instruction {
  
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f5f7ff;
  border: 1px solid #d9e2ff;
  font-size: 10px;
  line-height: 1.4;
  color: #1f2933;
  font-weight: 500;
}

/* Optional small icon circle */
.upi-instruction::before {
  content: "ⓘ";
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Make “I Have Already Paid” text inside more visible if wrapped in <span> */
.upi-instruction strong {
  color: #2563eb;
  font-weight: 700;
}

/* Mobile friendly */
@media (max-width: 480px) {
  .upi-instruction {
    width: 100%;
    font-size: 13px;
    padding: 8px 10px;
  }
}

.wvc-summary-box { background: var(--wvc-card); border-radius: 8px; padding: 16px; margin-bottom: 12px; }
.wvc-summ-header { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-bottom: 12px; }
.wvc-prod-row { display: flex; align-items: center; gap: 12px; }
.wvc-prod-thumb { width: 40px; height: 40px; background: #333; border-radius: 4px; color: #666; display: flex; align-items: center; justify-content: center; }
.wvc-prod-info { flex: 1; }
.wvc-prod-title { font-size: 13px; font-weight: 500; }
.wvc-prod-price { font-size: 15px; font-weight: 700; margin-top: 2px; }

.wvc-coupon-block { background: var(--wvc-card); border-radius: 8px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.wvc-coupon-icon { width: 20px; height: 20px; background: var(--wvc-green); border-radius: 50%; color: #fff; font-size: 12px; font-weight: bold; display: flex; align-items: center; justify-content: center; }
.wvc-coupon-text { flex: 1; display: flex; flex-direction: column; }
.wvc-cp-head { font-size: 13px; font-weight: 600; }
.wvc-cp-sub { font-size: 11px; color: var(--wvc-green); }
.wvc-cp-arrow { font-size: 18px; color: #666; }

.wvc-trust-footer { margin-top: auto; border-top: 1px solid #333; padding-top: 20px; font-size: 11px; color: #666; }
.wvc-trust-footer strong { color: #fff; }

/* MAIN PANEL (White) */
.wvc-magic-main { flex: 1; display: flex; flex-direction: column; background: #fff; position: relative; margin:10px; border-radius:0.5rem;}

.wvc-main-header { height: 60px; border-bottom: 1px solid var(--wvc-border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.wvc-header-title { font-weight: 700; font-size: 16px; color: #000; }
.wvc-nav-btn { background: none; border: none; font-size: 24px; color: #666; cursor: pointer; }

.wvc-body-content { 
    flex: 1; 
    overflow-y: auto; 
    padding: 24px; 
    position: relative;
    /* FIX: Enables smooth touch scrolling */
    -webkit-overflow-scrolling: touch; 
    overscroll-behavior: contain;
}
.wvc-view { display: none; animation: slideIn 0.2s ease-out; }
.wvc-view.active { display: block; }
@keyframes slideIn { from{opacity:0;transform:translateY(10px);} to{opacity:1;transform:translateY(0);} }

/* INPUTS */
.wvc-input-float { position: relative; border: 1px solid #dcdcdc; border-radius: 4px; padding: 0 12px; height: 50px; display: flex; align-items: center; margin-bottom: 16px; transition: border 0.2s; }
.wvc-input-float:focus-within { border-color: #000; box-shadow: 0 0 0 1px #000; }
.wvc-input-float label { position: absolute; left: 12px; top: 8px; font-size: 10px; color: #888; text-transform: uppercase; font-weight: 700; pointer-events: none; }
.wvc-input-float input { width: 100%; border: none; font-size: 15px; margin-top: 14px; outline: none; padding: 0; background: transparent; }
.wvc-country-code { margin-top: 14px; margin-right: 8px; font-size: 15px; color: #000; }
.wvc-text-btn { border: none; background: none; color: var(--wvc-green); font-weight: 700; font-size: 12px; text-transform: uppercase; cursor: pointer; }
.wvc-locked { background: #f9f9f9; color: #666; }

.wvc-row-split { display: flex; gap: 12px; }
.wvc-row-split > div { flex: 1; }

.wvc-checkbox-row { display: flex; gap: 10px; font-size: 13px; color: #666; align-items: center; margin-bottom: 20px; }
.wvc-app-icons-inner{   display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-content: center !important;
    justify-content: center !important;}
/* BUTTONS */
.wvc-btn-black { width: 100%; height: 48px; background: #000; color: #fff; border: none; border-radius: .5rem; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 10px; line-height:1.5rem; }
.wvc-btn-black:disabled { background: #ccc; }

/* PAYMENT SPLIT */
.wvc-payment-layout { display: flex; gap: 24px; height: 100%; }
.wvc-pay-methods { flex: 1; }
.wvc-pay-details { width: 300px; border-left: 1px solid var(--wvc-border); padding-left: 24px; display: none; }

.wvc-label-sm { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #888; margin-bottom: 12px; }

.wvc-pay-item { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--wvc-border); border-radius: 8px; margin-bottom: 10px; cursor: pointer; transition: 0.2s; background: #fff; }
.wvc-pay-item:hover { border-color: #999; }
.wvc-pay-item.selected { border-color: var(--wvc-green); background: #fcfdfd; box-shadow: inset 0 0 0 1px var(--wvc-green); }

.wvc-icon-box { width: 36px; height: 36px; border: 1px solid #eee; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.wvc-icon-box img { width: 20px; }
.wvc-item-info { flex: 1; }
.wvc-item-title { font-size: 14px; font-weight: 600; color: #000; }
.wvc-item-sub { font-size: 11px; color: #666; margin-top: 2px; }
.wvc-badge-green { font-size: 10px; background: var(--wvc-green-light); color: var(--wvc-green); padding: 2px 6px; border-radius: 4px; font-weight: 700; display: inline-block; margin-top: 4px; }
.wvc-radio { width: 16px; height: 16px; border: 2px solid #ccc; border-radius: 50%; }
.wvc-pay-item.selected .wvc-radio { border-color: var(--wvc-green); background: var(--wvc-green); }

/* QR PANEL */
.wvc-qr-card { text-align: center; border: 1px solid var(--wvc-border); border-radius: 8px; padding: 16px; margin-bottom: 15px; }
#wvc-qr-code { width: 160px; height: 160px; margin: 10px 0; }
.wvc-qr-timer { font-size: 11px; background: #fffbeb; color: #d97706; padding: 2px 8px; border-radius: 10px; display: inline-block; font-weight: 600; }
.wvc-app-icons { display: flex; gap: 8px; justify-content: center; margin-top: 10px; opacity: 0.8; }
.wvc-app-icons img { height: 12px;   }

.wvc-upload-btn { display: block; text-align: center; font-size: 13px; color: #666; border: 1px dashed #ccc; padding: 10px; cursor: pointer; border-radius: 4px; }

/* BILL BOX */
.wvc-bill-box { background: #f9f9f9; padding: 16px; border-radius: 8px; margin-bottom: 15px; }
.wvc-bill-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: #444; }
.wvc-bill-row.total { font-weight: 700; font-size: 15px; color: #000; margin-top: 10px; border-top: 1px dashed #ccc; padding-top: 10px; }
.wvc-red { color: #d93025; }
.appimg { height: 20px !important;  margin-left:5px;}
/* MOBILE */
/* --- MOBILE RESPONSIVE FIX --- */
@media (max-width: 768px) {
    #wvc-modal-overlay {
        align-items: flex-end; /* Aligns to bottom like a sheet */
    }

    #wvc-modal { 
        flex-direction: column; 
        width: 100%; 
        /* FIX: Use dynamic viewport height to handle mobile address bars */
        height: 100dvh; 
        max-height: 100dvh; 
        border-radius: 0; 
    }
    
    /* Sidebar becomes Toggle Header */
    .wvc-magic-sidebar { 
        width: 100%; 
        height: auto; 
        min-height: auto; /* Reset height */
        padding: 0; 
        order: -1; 
        flex-shrink: 0; /* Prevent shrinking */
    }

    .wvc-sidebar-content { 
        display: none; 
        background: #1a1b1f; /* Ensure background matches sidebar */
        position: absolute; /* Float above content if opened */
        top: 50px;
        left: 0;
        width: 100%;
        z-index: 20;
        height: auto;
        padding-bottom: 20px;
    } 
    
    .wvc-mobile-header { 
        display: flex; 
        align-items: center; 
        justify-content: space-between; 
        padding: 12px 16px; 
        background: #0f1014; 
        color: #fff; 
        cursor: pointer;
        height: 50px; /* Fixed height for header */
        box-sizing: border-box;
    }

    .wvc-mob-brand { display: flex; gap: 10px; align-items: center; }
    .wvc-mob-title { font-size: 10px; color: #aaa; text-transform: uppercase; display: block; }
    .wvc-mob-amount { font-size: 14px; font-weight: 700; }
    .wvc-brand-logo { width: 32px; height: 32px; background: #fff; color: #000; display: flex; align-items: center; justify-content: center; font-weight: 800; border-radius: 4px; }

    /* Main Content Area */
    .wvc-magic-main { 
        border-radius: 12px 12px 0 0; 
        z-index: 10; 
        border-top: 1px solid #333; 
        flex: 1; /* Take remaining height */
        display: flex;
        flex-direction: column;
        overflow: hidden; /* Contain scroll to body */
    }

    .wvc-main-header {
        flex-shrink: 0; /* Don't shrink header */
    }

    /* FIX: Add padding at bottom so buttons aren't cut off */
    .wvc-body-content { 
        padding: 16px 16px 40px 16px; 
    }
    
    /* Payment Stack */
    .wvc-payment-layout { flex-direction: column; }
    .wvc-pay-details { width: 100%; border-left: none; padding-left: 0; margin-top: 20px; display: none; }
    
    /* Show details when payment is active on mobile */
    .wvc-pay-details.active-mobile { display: block; }
}

/* --- CONFIRMATION POPUP --- */
#wvc-confirm-popup {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
    border-radius: 1rem; /* Match modal radius */
}

.wvc-confirm-box {
    background: #fff;
    width: 320px;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    animation: popIn 0.2s ease-out;
}

.wvc-confirm-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.wvc-confirm-box h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #000;
}

.wvc-confirm-box p {
    margin: 0 0 24px 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.wvc-btn-white {
    width: 100%;
    height: 44px;
    background: #fff;
    color: #000;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: 0.2s;
}
.wvc-btn-white:hover { background: #f9f9f9; border-color: #ccc; }

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}