/* ═══════════════════════════════════════════════════════════
   Patakaa.in — Ajrakh-Inspired Ethnic Block-Print Theme
   Palette: Deep Indigo + Rust Terracotta + Ivory
   ═══════════════════════════════════════════════════════════ */

/* ── Airpay Modal Overlay ── */
.airpay-modal {
    display: flex;
    position: fixed;
    z-index: 99999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 25, 40, 0.68);
    align-items: flex-start;
    justify-content: center;
    padding: 24px 14px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.airpay-modal-content {
    background: #faf6ee;
    border-radius: 14px;
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    box-shadow: 0 24px 55px rgba(15, 25, 40, 0.4);
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    border: 1px solid #e4d8c3;
    margin: auto 0;
}

/* ── Header ── */
.airpay-header {
    background: linear-gradient(150deg, #1d3557 0%, #24405e 55%, #2c4a6e 100%);
    padding: 26px 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

/* Ajrakh-style zigzag border strip under header */
.airpay-header::after {
    content: "";
    display: block;
    position: absolute;
    bottom: -8px; left: 0;
    width: 100%; height: 8px;
    background:
        linear-gradient(135deg, #c1502e 25%, transparent 25%) 0 0,
        linear-gradient(225deg, #c1502e 25%, transparent 25%) 0 0,
        linear-gradient(315deg, #c1502e 25%, transparent 25%) 0 100%,
        linear-gradient(45deg, #c1502e 25%, transparent 25%) 0 100%;
    background-size: 12px 12px;
    background-repeat: repeat-x;
}

.airpay-close {
    position: absolute;
    top: 12px; right: 14px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(193,80,46,0.6);
    color: #f2e9d8;
    width: 30px; height: 30px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.15s;
}
.airpay-close:hover { background: rgba(193,80,46,0.4); }

.airpay-logo-box {
    background: #ffffff;
    border: 2px solid #c1502e;
    border-radius: 10px;
    padding: 14px 0;
    margin-bottom: 14px;
    width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.28);
}

.airpay-logo-img {
    width: 145px;
    height: auto;
    object-fit: contain;
    display: block;
}

.airpay-secure-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(193,80,46,0.22);
    border: 1px solid rgba(193,80,46,0.55);
    border-radius: 4px;
    padding: 4px 14px;
    font-size: 11px;
    color: #f2e9d8;
    letter-spacing: 0.6px;
    font-weight: 500;
}

/* ── Body ── */
.airpay-body {
    padding: 24px 18px 20px;
    background: #faf6ee;
}

.airpay-subtitle {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 17px;
    font-weight: 700;
    color: #1d3557;
    text-align: center;
    margin: 0 0 16px;
    letter-spacing: 0.2px;
}

/* ── QR Box ── */
.airpay-qr-box {
    background: #ffffff;
    border-radius: 10px;
    padding: 16px 14px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    border: 1px solid #e4d8c3;
    position: relative;
}

/* Block-stamp square corners (ajrakh motif) instead of rounded/diamond */
.airpay-corner {
    position: absolute;
    width: 10px; height: 10px;
    border-color: #c1502e;
    border-style: solid;
    border-width: 0;
}
.airpay-corner.tl { top: 6px; left: 6px; border-top-width: 3px; border-left-width: 3px; }
.airpay-corner.tr { top: 6px; right: 6px; border-top-width: 3px; border-right-width: 3px; }
.airpay-corner.bl { bottom: 6px; left: 6px; border-bottom-width: 3px; border-left-width: 3px; }
.airpay-corner.br { bottom: 6px; right: 6px; border-bottom-width: 3px; border-right-width: 3px; }

/* ── UPI Apps ── */
.airpay-divider-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.airpay-line { flex: 1; height: 1px; background: #e4d8c3; }
.airpay-divider-text { font-size: 10.5px; color: #8a7355; white-space: nowrap; letter-spacing: 0.3px; text-transform: uppercase; }

.airpay-upi-apps {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 13px;
    width: 100%;
    padding: 2px 0 4px;
    flex-wrap: nowrap;
}

.airpay-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* GPay ne visually featured/bigger banavyu che */
.airpay-app--featured { margin: 0 1px; }

.airpay-app-icon {
    width: 38px; height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(29,53,87,0.18);
    border: 1px solid #ece2cf;
}

.airpay-app-icon--big {
    width: 52px; height: 52px;
    border-radius: 12px;
    border: 2px solid #c1502e;
    box-shadow: 0 5px 14px rgba(193,80,46,0.28);
}

.airpay-app-label {
    font-size: 9px;
    color: #6b5a42;
    font-weight: 500;
}
.airpay-app-label--featured {
    font-weight: 700;
    color: #c1502e;
    font-size: 9.5px;
}

/* ── Trust / Security badge (naya) ── */
.airpay-trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eef2f6;
    border: 1px solid #c9d6e3;
    border-left: 4px solid #1d3557;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 14px 0 0;
}
.airpay-trust-badge svg { flex-shrink: 0; }
.airpay-trust-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    text-align: left;
}
.airpay-trust-text strong {
    font-size: 12.5px;
    color: #1d3557;
    font-weight: 700;
}
.airpay-trust-text span {
    font-size: 10.5px;
    color: #6b7a8c;
}

/* ── Amount ── */
.airpay-amount-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5ece0;
    border-radius: 8px;
    padding: 11px 15px;
    margin: 14px 0;
    border: 1px solid #e4d8c3;
}
.airpay-amount-label { font-size: 12px; color: #8a7355; font-weight: 600; }
.airpay-amount-value { font-family: 'Fraunces', Georgia, serif; font-size: 20px; font-weight: 700; color: #1d3557; }

/* ── Buttons ── */
.airpay-pay-btn {
    width: 100%;
    background: linear-gradient(135deg, #c1502e, #a8431f);
    color: #ffffff;
    border: none;
    border-radius: 9px;
    padding: 14px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.airpay-pay-btn:hover { background: linear-gradient(135deg, #a8431f, #8f3819); }

.airpay-utr-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d8cbb0;
    border-radius: 8px;
    font-size: 16px; /* 16px so iOS Safari doesn't auto-zoom on focus */
    margin-bottom: 8px;
    outline: none;
    box-sizing: border-box;
    background: #ffffff;
    color: #1d1d1d;
}
.airpay-utr-input:focus { border-color: #c1502e; box-shadow: 0 0 0 3px rgba(193,80,46,0.15); }

.airpay-utr-submit {
    width: 100%;
    background: #1d3557;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.airpay-utr-submit:hover { background: #16283f; }

/* ── Checking status note ── */
.airpay-checking-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: #f5ece0;
    border: 1px solid #e4d8c3;
    border-radius: 8px;
    padding: 9px 10px;
    margin: 10px 0 2px;
    font-size: 11.5px;
    color: #6b5a42;
    text-align: center;
    line-height: 1.4;
}
.airpay-spinner {
    width: 12px; height: 12px;
    border: 2px solid #e4d8c3;
    border-top-color: #c1502e;
    border-radius: 50%;
    flex-shrink: 0;
    animation: airpay-spin 0.8s linear infinite;
}
@keyframes airpay-spin {
    to { transform: rotate(360deg); }
}

/* ── Order-cancel confirmation popup ── */
.airpay-confirm-overlay {
    display: flex;
    position: fixed;
    z-index: 100000;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 25, 40, 0.65);
    align-items: flex-start;
    justify-content: center;
    padding: 24px 14px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.airpay-confirm-box {
    background: #faf6ee;
    border-radius: 12px;
    width: 100%;
    max-width: 320px;
    padding: 24px 20px 18px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(15,25,40,0.4);
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    border: 1px solid #e4d8c3;
    margin: auto 0;
}
.airpay-confirm-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #1d3557;
    margin: 0 0 8px;
}
.airpay-confirm-text {
    font-size: 12.5px;
    color: #8a7355;
    line-height: 1.5;
    margin: 0 0 18px;
}
.airpay-confirm-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.airpay-confirm-btn {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.airpay-confirm-no {
    background: #1d3557;
    color: #ffffff;
}
.airpay-confirm-no:hover { background: #16283f; }
.airpay-confirm-yes {
    background: #f5ece0;
    color: #a8431f;
    border: 1px solid #e4d8c3;
}
.airpay-confirm-yes:hover { background: #efe1cd; }

/* ── Expired / Failed message ── */
.airpay-expired-msg {
    background: #f5ece0;
    border: 1px solid #e4d8c3;
    border-radius: 8px;
    padding: 12px 14px;
    margin: 12px 0 4px;
}
.airpay-expired-msg p {
    margin: 0;
    font-size: 12px;
    line-height: 1.5;
    color: #8a3f24;
    text-align: center;
}

/* ── Footer ── */
.airpay-note {
    font-size: 11px;
    color: #a8916f;
    text-align: center;
    margin: 10px 0 4px;
}

.airpay-ssl {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 10px;
    color: #a8916f;
}

/* App icon buttons */
.airpay-app-btn {
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    transition: opacity 0.15s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.airpay-app-btn:hover { opacity: 0.88; transform: translateY(-1px); }
.airpay-app-btn:active { opacity: 0.7; transform: scale(0.95); }

/* ═══════════════════════════════════════════════════════════
   Mobile responsive fixes
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 400px) {
    .airpay-modal { padding: 16px 10px; }
    .airpay-header { padding: 22px 14px 14px; }
    .airpay-logo-box { width: 175px; padding: 12px 0; }
    .airpay-logo-img { width: 125px; }
    .airpay-body { padding: 20px 14px 16px; }
    .airpay-subtitle { font-size: 15px; margin-bottom: 12px; }
    .airpay-qr-box { padding: 12px 10px 10px; }
    #airpay-qr svg, #airpay-qr img, #airpay-qr canvas { width: 170px !important; height: 170px !important; }
    .airpay-upi-apps { gap: 8px; }
    .airpay-app-icon { width: 34px; height: 34px; }
    .airpay-app-icon--big { width: 46px; height: 46px; }
    .airpay-app-btn { width: 34px; height: 34px; }
    .airpay-app-label { font-size: 8px; }
    .airpay-trust-badge { padding: 9px 10px; gap: 8px; }
    .airpay-trust-text strong { font-size: 11.5px; }
    .airpay-trust-text span { font-size: 9.5px; }
    .airpay-amount-row { padding: 10px 12px; margin: 12px 0; }
    .airpay-amount-value { font-size: 18px; }
    .airpay-pay-btn { font-size: 13px; padding: 13px; }
    .airpay-confirm-box { padding: 20px 16px 16px; }
}

@media (max-width: 340px) {
    .airpay-logo-box { width: 150px; }
    .airpay-logo-img { width: 110px; }
    .airpay-upi-apps { gap: 6px; }
    .airpay-app-icon { width: 31px; height: 31px; }
    .airpay-app-icon--big { width: 42px; height: 42px; }
}

/* Landscape / short-height phones — let content scroll instead of clipping */
@media (max-height: 620px) {
    .airpay-modal, .airpay-confirm-overlay { align-items: flex-start; padding-top: 16px; padding-bottom: 16px; }
}
