/* --- STEPPER DESIGN --- */
.checkout-stepper-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 24px 40px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    margin-bottom: 30px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step-item.active .step-num {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: white;
}

.step-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.step-item.active .step-label {
    color: var(--brand-navy);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 20px;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .checkout-stepper-wrap {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px 14px;
    }

    .step-item {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
        padding: 8px 10px;
        border-radius: 12px;
        background: transparent;
    }

    .step-line {
        display: none;
    }

    .step-num {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .step-label {
        font-size: 0.9rem;
    }

    /* Make the active step more prominent on mobile */
    .step-item.active {
        background: rgba(0, 26, 114, 0.04);
        border-radius: 12px;
    }
}





.esim-selection-container {
    background: var(--white);
    border-radius: 24px;
    padding: 24px;
    /* Optimized for mobile */
    /* max-width: 1000px; */
    /* margin: 0 auto; */
}

/* Header UI */
.selection-header {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    align-items: center;
}

.header-icon-box {
    background: #F1F5F9;
    color: var(--brand-navy);
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.header-text h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--brand-teal);
    line-height: 1.2;
}

.header-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* 2-Column Grid (Super Responsive) */
.esim-selection-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    /* Mobile Default */
    gap: 12px;
}

@media (min-width: 768px) {
    .esim-selection-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* Interactive Cards */
.esim-select-card {
    cursor: pointer;
    position: relative;
}

.esim-select-card input {
    display: none;
}

.card-inner {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.esim-select-card input:checked+.card-inner {
    border-color: var(--brand-navy);
    background: #F8FAFF;
    transform: translateY(-4px);
    box-shadow: 0 10px 15px rgba(0, 26, 114, 0.08);
}

.flag-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    /* Squircle */
    overflow: hidden;
    border: 1px solid var(--border);
    display: flex;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.flag-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Keeps flags from stretching */
}



.title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--brand-navy);
}

.network-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 2px 0 10px 0;
}

/* Status Pills */
.data-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-teal-soft);
    color: var(--brand-teal);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 800;
}

.data-status-pill.ready {
    background: #F1F5F9;
    color: var(--brand-navy);
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: var(--brand-teal);
    border-radius: 50%;
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.3);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}




/* Selection Indicator */
.selection-indicator {
    color: var(--brand-navy);
    font-size: 1.2rem;
    opacity: 0;
    transition: 0.2s;
}

.esim-select-card input:checked+.card-inner .selection-indicator {
    opacity: 1;
}

/* Add New Style */
.add-country-card .dashed-boundary {
    border: 2px dashed var(--border);
    border-radius: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    transition: 0.2s;
}

.add-country-card:hover .dashed-boundary {
    border-color: var(--brand-navy);
    background: #F8FAFC;
}

.plus-circle {
    width: 32px;
    height: 32px;
    background: var(--brand-navy);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.add-text strong {
    font-size: 0.85rem;
    color: var(--brand-navy);
    display: block;
}

.add-text span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Footer Action */
.selection-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 32px;
    gap: 10px;
}

.btn-primary-action {
    background: var(--brand-teal);
    color: var(--white);
    padding: 14px 20px;
    border-radius: 14px;
    border: none;
    outline: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: 0.3s;
    width: fit-content;
    /* Full width on mobile */
}

@media (min-width: 768px) {
    .btn-primary-action {
        width: auto;
    }
}

.btn-primary-action:hover {
    background: #000F42;
    transform: translateX(4px);
}





/* Container Background */
.plan-selection-container {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 24px;
    /* max-width: 1100px; */
    /* margin: 0 auto; */
    box-shadow: 0 8px 30px rgba(6, 15, 40, 0.04);
}

/* Tabs Styling */
.plan-filter-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
}

.tab-pill {
    padding: 8px 12px;
    border-radius: 12px;
    border: 1.2px solid var(--border);
    background: #F8FAFC;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.75rem;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    scroll-snap-align: start;
}

.tab-pill.active {
    background: var(--brand-navy);
    color: white;
    border-color: var(--brand-navy);
}

/* Plan Grid - Responsive 2-column mobile */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

@media (max-width: 420px) {
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Plan Card (image_bc4981.png style) */
.plan-card {
    border: 1.5px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    position: relative;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    background: white;
    display: flex;
    flex-direction: column;
}

.plan-card.active {
    border-color: var(--brand-navy);
    background: #F8FAFF;
    box-shadow: 0 14px 36px rgba(0, 26, 114, 0.08);
}

.plan-card.popular {
    border-color: var(--brand-teal);
}

/* Popular Badge */
.popular-badge {
    position: absolute;
    top: 0;
    right: 20px;
    background: var(--brand-teal);
    color: white;
    padding: 4px 12px;
    border-radius: 0 0 10px 10px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Card Content */
.plan-type {
    font-size: 0.7rem;
    font-weight: 900;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
}

.plan-data {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--brand-navy);
    line-height: 1;
}

.plan-validity {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.plan-price {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--brand-navy);
    margin-bottom: 16px;
}

/* Features List */
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 8px;
}

.plan-features li i {
    color: var(--brand-teal);
    font-size: 1rem;
}

.plan-features li.disabled {
    opacity: 0.5;
}

.plan-features li.disabled i {
    color: #CBD5E1;
}

/* Footer Buttons */
.btn-back {
    background: #F1F5F9;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 700;
    color: var(--brand-navy);
    cursor: pointer;
    margin-right: 10px;
}

/* Make selection footer sticky on small screens for easy CTA access */
@media (max-width: 640px) {
    .selection-footer {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        gap: 10px;
        padding: 12px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.9));
        box-shadow: 0 -8px 24px rgba(6, 15, 40, 0.06);
        z-index: 50;
    }

    .selection-footer .btn-back {
        flex: 1;
    }

    .selection-footer .btn-primary-action {
        flex: 2;
        justify-content: center;
    }

    .tab-pill {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
}

/* Improve touch targets and spacing on small screens */
@media (max-width: 480px) {
    .selection-header {
        gap: 12px;
    }

    .header-text h2 {
        font-size: 1.05rem;
    }

    .plans-grid {
        gap: 12px;
    }

    .plan-card {
        padding: 14px;
    }

    .plan-data {
        font-size: 1.5rem;
    }

    .plan-price {
        font-size: 1.25rem;
    }
}


/* Payment Grid Logic */
.payment-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

@media (max-width: 992px) {
    .payment-grid {
        grid-template-columns: 1fr;
    }
}

.payment-methods-card {
    background: #FFFFFF;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 20px;
}

/* Payment Method Cards */
.method-option {
    cursor: pointer;
    display: block;
    margin-bottom: 12px;
}

.method-option input {
    display: none;
}

.method-inner {
    background: #FFFFFF;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: 0.3s;
}

.method-option input:checked+.method-inner {
    border-color: var(--brand-navy);
    background: #F8FAFF;
    box-shadow: 0 4px 15px rgba(0, 26, 114, 0.05);
}

.method-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.method-icon.wallet {
    background: #E6F7F0;
    color: var(--brand-teal);
}

.method-icon.card {
    background: #EEF2FF;
    color: var(--brand-navy);
}

.method-badge {
    background: var(--brand-teal-soft);
    color: var(--brand-teal);
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 800;
}

/* Success Modal Styles */
.success-variant {
    text-align: center;
    padding: 40px;
    max-width: 450px;
}

.check-circle-main {
    width: 80px;
    height: 80px;
    background: var(--brand-teal);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 24px;
    box-shadow: 0 10px 25px rgba(0, 175, 102, 0.3);
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.receipt-preview {
    background: #F8FAFC;
    border-radius: 16px;
    padding: 20px;
    margin: 24px 0;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.receipt-row strong {
    color: var(--brand-navy);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Modal overlay/backdrop */
.modal-overlay {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6, 15, 40, 0.5);
    z-index: 1200;
    backdrop-filter: blur(6px);
    padding: 24px;
}

.modal-overlay.open,
.modal-overlay.active {
    display: flex;
}

.modal-container {
    background: white;
    border-radius: 18px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 30px 80px rgba(6, 15, 40, 0.35);
    overflow: hidden;
}

.modal-container.success-variant {
    padding: 28px 28px 20px;
}

.confetti-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 18px;
    background: var(--brand-teal);
    opacity: 0.95;
    transform-origin: center;
    border-radius: 2px;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-10vh) rotate(0deg) scale(1);
        opacity: 1
    }

    70% {
        opacity: 1
    }

    100% {
        transform: translateY(80vh) rotate(360deg) scale(0.9);
        opacity: 0
    }
}

.success-content h2 {
    font-family: var(--display);
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--brand-navy);
}

.success-content p {
    color: var(--text-muted);
    margin-bottom: 12px
}

.receipt-preview {
    border-radius: 12px;
    padding: 16px;
    background: linear-gradient(180deg, #F8FAFC, #FFFFFF);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.receipt-row {
    font-size: 0.95rem;
    color: var(--brand-navy);
}

.success-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-full {
    padding: 12px 14px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 700
}

.btn-full.primary {
    background: var(--brand-navy);
    color: #fff
}

.btn-full.secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--brand-navy)
}

/* prevent body scroll when modal open */
body.modal-open {
    overflow: hidden;
}

/* Sidebar Container */
.summary-sticky-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 24px;
    position: sticky;
    top: 20px;
}

.summary-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--brand-navy);
    margin-bottom: 20px;
}

/* The Dark Plan Preview (Mirroring image_919962.png) */
.plan-preview-card {
    background: linear-gradient(135deg, #001A72 0%, #000F42 100%);
    border-radius: 18px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.preview-flag {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.8rem;
}

.preview-target strong {
    display: block;
    font-size: 0.95rem;
}

.preview-target span {
    font-size: 0.75rem;
    opacity: 0.7;
}

.preview-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.preview-data {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -1px;
}

.preview-price {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--brand-teal);
    /* High contrast teal from brand */
}

.preview-footer {
    font-size: 0.75rem;
    opacity: 0.8;
    position: relative;
    z-index: 2;
}

/* Watermark Background */
.watermark-text {
    position: absolute;
    right: -10px;
    top: 10px;
    font-size: 5rem;
    font-weight: 900;
    opacity: 0.05;
    pointer-events: none;
}

/* Billing Table Styles */
.billing-details {
    margin-top: 20px;
}

.bill-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.bill-item .label {
    color: var(--text-muted);
}

.bill-item .value {
    color: var(--brand-navy);
    font-weight: 700;
}

.bill-item.discount .value {
    color: var(--brand-teal);
}

.bill-divider {
    height: 1px;
    background: var(--border-color);
    margin: 16px 0;
}

.bill-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bill-total .label {
    font-size: 1rem;
    font-weight: 800;
    color: var(--brand-navy);
}

.bill-total .value {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--brand-navy);
}

/* Secure Badge */
.secure-checkout-badge {
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--brand-teal);
    background: var(--brand-teal-soft);
    padding: 10px;
    border-radius: 12px;
}