﻿:root {
    --ios-bg: #f5f5f7;
    --ios-card: #f1f2f4; /* light gray card */
    --ios-border: rgba(0,0,0,.08);
    --ios-text: #1c1c1e;
    --ios-sub: rgba(60,60,67,.72);
    --ios-blue: #0a84ff;
    --ios-blue-2: #007aff;
    --ios-shadow-sm: 0 6px 16px rgba(0,0,0,.08);
    --ios-radius: 18px;
}

/* ===== Card ===== */
.ios-card-wrap {
    border-radius: var(--ios-radius) !important;
    overflow: hidden;
}

.ios-card {
    background: var(--ios-card);
    border: 1px solid var(--ios-border);
    border-radius: var(--ios-radius);
    box-shadow: var(--ios-shadow-sm);
    padding: 14px;
}

/* ===== Text ===== */
.ios-label {
    display: block;
    font-weight: 800;
    font-size: 13px;
    color: var(--ios-text);
    margin-bottom: 8px;
}

.ios-help {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--ios-sub);
}

/* ===== Input Group (keeps iOS look + mobile clean) ===== */
.ios-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(118,118,128,.12);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 14px;
    padding: 10px;
    flex-wrap: nowrap; /* IMPORTANT: stop ugly stacking */
}

.ios-input-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: rgba(60,60,67,.72);
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 10px;
    flex: 0 0 auto;
}

.ios-input {
    flex: 1 1 auto;
    min-width: 0; /* IMPORTANT for ellipsis in flex */
    border: none !important;
    outline: none !important;
    background: transparent !important;
    font-size: 14px;
    color: var(--ios-text);
    padding: 4px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* keep URL / Till ID neat */
}

    .ios-input::placeholder {
        color: rgba(60,60,67,.55);
    }

/* ===== Buttons (single definition only) ===== */
.ios-btn {
    border: none;
    outline: none;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
    padding: 10px 16px;
    user-select: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1;
    flex: 0 0 auto; /* stop stretching */
}

    .ios-btn:active {
        transform: scale(.98);
    }

.ios-btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.ios-btn-ghost {
    background: rgba(118,118,128,.12);
    color: var(--ios-text);
    border: 1px solid rgba(0,0,0,.08);
}

.ios-btn-primary {
    background: linear-gradient(180deg,var(--ios-blue),var(--ios-blue-2));
    color: #fff;
    box-shadow: 0 10px 20px rgba(10,132,255,.25);
}

.ios-btn-whatsapp {
    background: linear-gradient(180deg,#25D366,#16b454);
    color: #fff;
    box-shadow: 0 10px 20px rgba(37,211,102,.22);
}

/* ===== Copy / Paste buttons should be SMALL (iOS style) ===== */
/* If your Copy button has id="btnCopy" keep this */
#btnCopy, #btnPaste, .btn-copy {
    padding: 8px 14px !important;
    font-size: 13px !important;
    min-height: 34px;
}

/* ===== Actions bar ===== */
.ios-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
    margin-top: 10px;
    border-top: 1px solid rgba(0,0,0,.06);
    flex-wrap: wrap;
}

/* ===== Scroll ===== */
.ios-scroll {
    max-height: 520px;
    overflow: auto;
    padding-right: 6px;
    padding-bottom: 6px;
    border-radius: 16px;
}

    .ios-scroll::-webkit-scrollbar {
        width: 10px;
    }

    .ios-scroll::-webkit-scrollbar-track {
        background: transparent;
    }

    .ios-scroll::-webkit-scrollbar-thumb {
        background: rgba(60,60,67,.22);
        border-radius: 999px;
        border: 3px solid transparent;
        background-clip: content-box;
    }

    .ios-scroll:hover::-webkit-scrollbar-thumb {
        background: rgba(60,60,67,.30);
    }

/* ===== Package UI (same as yours, kept minimal) ===== */
.pkg-item {
    display: block;
    margin: 10px 0;
}

    .pkg-item input[type="radio"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.pkg-ui {
    display: block;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.85);
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.04);
    transition: transform .12s ease,border-color .12s ease,box-shadow .12s ease,background .12s ease;
    position: relative;
    overflow: hidden;
    padding-left: 44px;
}

    .pkg-ui::before {
        content: "";
        width: 18px;
        height: 18px;
        border-radius: 999px;
        border: 2px solid rgba(60,60,67,.25);
        position: absolute;
        left: 12px;
        top: 14px;
        background: rgba(255,255,255,.7);
    }

.pkg-item:hover .pkg-ui {
    transform: translateY(-1px);
}

.pkg-item input[type="radio"]:checked + .pkg-ui {
    border-color: rgba(10,132,255,.6);
    background: rgba(10,132,255,.06);
    box-shadow: 0 10px 22px rgba(10,132,255,.14);
}

    .pkg-item input[type="radio"]:checked + .pkg-ui::before {
        border-color: var(--ios-blue);
        background: radial-gradient(circle at center,var(--ios-blue) 0 45%,transparent 46% 100%);
    }

.pkg-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.pkg-name {
    font-weight: 900;
    font-size: 14px;
    color: var(--ios-text);
    letter-spacing: .2px;
}

.pkg-sub {
    display: block;
    font-size: 12px;
    color: var(--ios-sub);
    margin-bottom: 8px;
}

.pkg-desc {
    display: block;
    font-size: 12px;
    color: rgba(60,60,67,.78);
    margin-bottom: 10px;
    line-height: 1.35;
}

.pkg-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pkg-code {
    font-size: 12px;
    color: rgba(60,60,67,.75);
    font-weight: 800;
}

.pkg-price {
    font-size: 12px;
    color: var(--ios-text);
    text-align: right;
    white-space: nowrap;
}

    .pkg-price del {
        color: rgba(60,60,67,.45);
        margin-right: 6px;
    }

    .pkg-price b {
        font-size: 13px;
    }

/* ===== Pay / QR ===== */
.ios-paybox, .ios-qrbox {
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 16px;
    background: rgba(255,255,255,.85);
    padding: 14px;
    box-shadow: 0 6px 16px rgba(0,0,0,.06);
}

/* ===== Mobile tweaks ===== */
@media (max-width:576px) {

    /* Make the package list scroll inside viewport */
    #packagesBlock .pkg-scroll {
        max-height: calc(100vh - 320px); /* leaves space for header + url + buttons */
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 90px; /* space so last item not hidden behind sticky bar */
    }

    /* Sticky confirm bar always visible */
    #packagesBlock .ios-actions {
        position: sticky;
        bottom: 0;
        background: rgba(255,255,255,.92);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-top: 1px solid rgba(0,0,0,.08);
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
        border-radius: 0 0 18px 18px;
        z-index: 50;
        flex-direction: row; /* keep iOS compact */
        gap: 10px;
    }

        /* Two buttons in one row (compact iOS) */
        #packagesBlock .ios-actions .ios-btn {
            width: 50%;
            padding: 10px 12px;
            font-size: 14px;
        }
}

/* English text */
.text-en {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
    font-size: 12.5px;
    color: rgba(60,60,67,.75);
    line-height: 1.4;
}

/* Urdu text */
.text-ur {
    font-family: 'Noto Nastaliq Urdu', serif;
    font-size: 12.5px;
    color: rgba(60,60,67,.75);
    line-height: 1.9;
    direction: rtl;
    text-align: right;
    display: block;
    margin-top: 4px;
}
