/* ==========================================================================
   In-House Checkout & UPI Intent Stylesheet
   ========================================================================== */

:root {
    --primary-color: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #22c55e;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-box: 16px;
    --radius-input: 10px;
}

/* ---------------- Checkout Page Shell ---------------- */
.checkout-page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.checkout-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.checkout-back-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

.checkout-back-link:hover {
    color: var(--text-dark);
}

.checkout-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
}

.checkout-main-container {
    max-width: 650px;
    width: 100%;
    margin: 30px auto;
    padding: 0 16px;
    flex: 1;
}

/* ---------------- Order Summary Card ---------------- */
.checkout-summary-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-box);
    padding: 22px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 20px;
}

.summary-top {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.summary-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.summary-info {
    flex: 1;
}

.badge-instant {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.summary-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.35;
    margin-bottom: 4px;
}

.summary-specs {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.summary-price-box {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 14px;
}

.price-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.price-line .line-old {
    text-decoration: line-through;
}

.price-line .line-discount {
    color: #16a34a;
    font-weight: 700;
}

.price-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    margin-top: 6px;
}

.price-total-line .total-label {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-dark);
}

.price-total-line .total-amount {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-color);
}

.summary-guarantee {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* ---------------- Form Card ---------------- */
.checkout-form-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-box);
    padding: 26px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.form-header {
    margin-bottom: 22px;
}

.form-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.req-star {
    color: #ef4444;
}

.checkout-input {
    width: 100%;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-input);
    font-size: 1rem;
    color: var(--text-dark);
    transition: all 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.checkout-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.phone-input-wrap {
    display: flex;
    position: relative;
}

.phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: #e2e8f0;
    border: 1.5px solid #cbd5e1;
    border-right: none;
    border-top-left-radius: var(--radius-input);
    border-bottom-left-radius: var(--radius-input);
    font-size: 0.95rem;
    font-weight: 700;
    color: #475569;
}

.checkout-input.phone-field {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.input-hint {
    font-size: 0.78rem;
    color: #15803d;
    font-weight: 600;
    margin-top: 5px;
}

/* Pay Button */
.btn-pay-upi {
    width: 100%;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.35);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    margin-top: 10px;
}

.btn-pay-upi:hover {
    background: linear-gradient(135deg, #15803d, #16a34a);
    box-shadow: 0 10px 28px rgba(22, 163, 74, 0.45);
    transform: translateY(-2px);
}

.btn-pay-upi:active {
    transform: translateY(0);
}

.pay-btn-text {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.pay-btn-sub {
    font-size: 0.8rem;
    opacity: 0.92;
    margin-top: 2px;
}

.upi-apps-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.76rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 14px;
    text-align: center;
}

/* ---------------- Payment Screen ---------------- */
.checkout-payment-screen {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-box);
    padding: 28px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    text-align: center;
    animation: fadeIn .3s ease;
}

.success-icon-anim {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 1.8rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.mobile-apps-container {
    margin: 22px 0;
}

.upi-apps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .upi-apps-grid {
        grid-template-columns: 1fr;
    }
}

.upi-app-btn {
    padding: 13px 16px;
    border-radius: 10px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.upi-app-btn.primary-app {
    grid-column: 1 / -1;
    background: #10b981;
    color: #ffffff;
    font-size: 1.05rem;
    padding: 15px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.upi-app-btn.phonepe-btn {
    background: #5f259f;
    color: #ffffff;
}

.upi-app-btn.gpay-btn {
    background: #1a73e8;
    color: #ffffff;
}

.upi-app-btn.paytm-btn {
    background: #002e6e;
    color: #ffffff;
}

.upi-app-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Desktop QR Code */
.desktop-qr-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.qr-image-wrapper {
    background: #ffffff;
    display: inline-block;
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin: 10px 0;
}

.qr-img {
    width: 220px;
    height: 220px;
}

.vpa-copy-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-top: 8px;
}

.btn-copy-vpa {
    background: #e2e8f0;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-copy-vpa:hover {
    background: #cbd5e1;
}

.utr-confirmation-card {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 18px;
    margin-top: 20px;
    text-align: left;
}

.utr-confirmation-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

/* Footer */
.checkout-footer {
    text-align: center;
    padding: 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---------------- Interactive In-House Checkout Modal (For Landing Page) ---------------- */
.inhouse-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 999999;
    overflow-y: auto;
    padding: 20px 14px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.inhouse-modal-overlay.active {
    display: flex;
}

.inhouse-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 520px;
    border-radius: var(--radius-box);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.inhouse-modal-header {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header-title {
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.inhouse-modal-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
}
