:root {
    /* Color Palette - Premium & Modern */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent: #6366f1; /* Deep Indigo */
    --accent-hover: #4f46e5;
    --accent-light: #e0e7ff;
    --error: #ef4444;
    --border: #e2e8f0;
    --border-focus: #818cf8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
    line-height: 1.5;
}

/* Form Wrapper & Container */
.form-wrapper {
    width: 100%;
    max-width: 600px;
    perspective: 1000px;
}

.form-container {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem 2rem;
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.form-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 30px -5px rgb(0 0 0 / 0.12), 0 10px 15px -6px rgb(0 0 0 / 0.1);
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header .logo {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.header .logo:hover {
    transform: scale(1.05);
}

.header h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #1e1b4b 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Section Title */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-light);
    color: var(--text-primary);
}

/* Form Layout */
.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

/* Labels */
label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    transition: color 0.2s ease;
}

.required {
    color: var(--error);
}

/* Inputs & Selects */
input[type="text"],
input[type="email"],
input[type="tel"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    background-color: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    padding-right: 2.5rem;
}

input:hover, select:hover {
    border-color: #cbd5e1;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--border-focus);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px var(--accent-light);
}

input:disabled, select:disabled {
    background-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Validation Styling */
.error-message {
    color: var(--error);
    font-size: 0.75rem;
    margin-top: 0.3rem;
    min-height: 1.1rem;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.error-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.input-error {
    border-color: var(--error) !important;
    background-color: #fef2f2 !important;
}

.input-error:focus {
    box-shadow: 0 0 0 4px #fee2e2 !important;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0 2rem;
}

.checkbox-group input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    accent-color: var(--accent);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.checkbox-group input[type="checkbox"]:hover {
    transform: scale(1.1);
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.95rem;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: white;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.submit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.submit-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.submit-btn svg {
    transition: transform 0.3s ease;
}

.submit-btn:hover svg {
    transform: translateX(4px);
}

/* intl-tel-input overrides */
.iti {
    width: 100%;
}
.iti__country-list {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

/* ─── Tab Navigation ─────────────────────────────────────── */
.tab-nav {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.75rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 0.35rem;
    border: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 0.65rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-lg) - 3px);
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.01em;
}

.tab-btn:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.tab-btn.active {
    color: white;
    background: var(--accent);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

/* ─── Tab Panels ─────────────────────────────────────────── */
.tab-panel {
    display: none;
    animation: fadeInPanel 0.3s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeInPanel {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Payment Panel General ──────────────────────────────── */
.payment-section {
    margin-bottom: 1.5rem;
}

/* ─── QR Placeholder ─────────────────────────────────────── */
.payment-qr-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 180px;
    height: 180px;
    border: 2px dashed var(--border-focus);
    border-radius: var(--radius-lg);
    background: var(--accent-light);
    color: var(--accent);
    padding: 1rem;
    text-align: center;
}

.qr-placeholder span {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
}

.qr-placeholder small {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

/* ─── Copy Items ─────────────────────────────────────────── */
.copy-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    margin-bottom: 0.6rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.copy-item:hover {
    border-color: var(--border-focus);
    box-shadow: var(--shadow-sm);
}

.copy-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.copy-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.copy-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.copy-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.85rem;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}

.copy-btn.copied {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

/* ─── Debit / Credit / EMI Button ────────────────────────── */
.payment-gateway-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.9rem 1.25rem;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
    letter-spacing: 0.01em;
}

.payment-gateway-btn:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}

.payment-gateway-btn:active {
    transform: translateY(1px);
}

/* ─── UPI Logo Strip ─────────────────────────────────────── */
.upi-title-logos {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.6rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.upi-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* ─── Country Accordion (nested inside section title) ────── */
.country-accordion-toggle {
    margin-bottom: 0.4rem;
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
}

.acc-toggle-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.country-accordion-body {
    margin-bottom: 0.5rem;
}

.country-accordion-body .intl-bank-card {
    margin-bottom: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    border-top: none;
}

/* ─── Accordion ──────────────────────────────────────────── */
.accordion-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
}

.accordion-toggle:hover {
    background: var(--accent-light);
    border-color: var(--border-focus);
    color: var(--accent);
}

.accordion-chevron {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.accordion-body {
    display: none;
    padding-top: 0.75rem;
}

.accordion-body.open {
    display: block;
    animation: fadeInPanel 0.25s ease;
}

/* ─── International Bank Cards ───────────────────────────── */
.intl-bank-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 0.85rem;
}

.intl-bank-card:last-child {
    margin-bottom: 0;
}

.intl-bank-currency {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Tighter copy items inside accordion */
.intl-bank-card .copy-item {
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.4rem;
}

/* ─── Receipt Notice ─────────────────────────────────────── */
.receipt-notice {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: var(--radius-md);
    color: #92400e;
    font-size: 0.9rem;
    font-weight: 500;
}

.receipt-notice svg {
    flex-shrink: 0;
    color: #b45309;
}

/* ─── Multiline Copy Item (Bank Details) ─────────────────── */
.copy-item--multiline {
    align-items: flex-start;
}

.copy-item--multiline .copy-btn {
    margin-top: 0.25rem;
    align-self: center;
}

.copy-multiline-row {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.3rem 0;
    border-bottom: 1px dashed var(--border);
}

.copy-multiline-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ─── Flag Icons ─────────────────────────────────────────── */
.flag-icon {
    width: 22px;
    height: auto;
    border-radius: 3px;
    vertical-align: middle;
    margin-right: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.intl-bank-currency {
    display: flex;
    align-items: center;
}

/* ─── Card Subtitle & Warning ────────────────────────────── */
.intl-bank-subtitle {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0.35rem 0 0.6rem;
}

.intl-bank-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.intl-bank-warning svg {
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.intl-bank-warning--red {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #b91c1c;
}

.intl-bank-warning--green {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}


@media (max-width: 480px) {
    .form-container {
        padding: 1.5rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }

    .tab-btn {
        font-size: 0.85rem;
        padding: 0.55rem 0.5rem;
    }

    .copy-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .copy-btn {
        align-self: flex-end;
    }
}
