/* ====================================================================
   Matrimony (Tab 362) — implementation.css
   Re-themed to use the site-wide colour variables from main.css
   so that Matrimony visually matches every other registration tab.
   ==================================================================== */

:root {
    /* Map Matrimony tokens to the site's shared variables so nothing
       inside this file needs hard-coded purple any more.             */
    --primary: var(--accent-color, #2E86AB);
    --primary-dark: var(--heading-color, #1B3A4B);
    --secondary: var(--accent-color, #2E86AB);
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --surface: #ffffff;
    --muted: #6c757d;
    --border: #e9ecef;
    --bg: #f8f9fa;
    --radius-sm: 4px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* Remove the font-family override so Matrimony inherits the site font */
#bhavsar-details-362 {
    color: var(--default-color, #3a3a3a);
    line-height: 1.6;
}

.page-hero {
    background: linear-gradient(135deg, rgba(27,58,75,0.95), rgba(46,134,171,0.95));
    color: #fff;
    padding: 60px 30px;
    text-align: center;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3rem);
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.component-card {
    background: #f8f9fa;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.section-title {
    color: var(--heading-color, #1B3A4B);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-color, #2E86AB);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--accent-color, #2E86AB);
    font-size: 1.3rem;
}

/* Registration ------------------------------------ */
.registration-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.registration-progress {
    display: grid;
    grid-template-columns: repeat(8, minmax(70px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.progress-step {
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted);
}

.step-number {
    width: 42px;
    height: 42px;
    margin: 0 auto 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(46, 134, 171, 0.12);
    color: var(--accent-color, #2E86AB);
    font-weight: 600;
    transition: background 0.25s ease;
}

.progress-step.active .step-number {
    background: var(--primary);
    color: #fff;
}

.progress-step.completed .step-number {
    background: var(--success);
    color: #fff;
}

.form-step {
    display: none;
    animation: fadeIn 0.35s ease;
}

.form-step.active {
    display: block;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

#bhavsar-details-362 .form-group label {
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

#bhavsar-details-362 .form-group input,
#bhavsar-details-362 .form-group select,
#bhavsar-details-362 .form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: #fff;
    font-size: 0.95rem;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 24px;
}

#bhavsar-details-362 .btn {
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#bhavsar-details-362 .btn-primary { background: var(--primary); color: #fff; }
#bhavsar-details-362 .btn-secondary { background: var(--bg); color: var(--muted); }
#bhavsar-details-362 .btn-success { background: var(--success); color: #fff; }
#bhavsar-details-362 .btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }

#bhavsar-details-362 .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* Photo upload ------------------------------------ */
.photo-upload-section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.upload-zones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    text-align: center;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.upload-zone.primary { border-color: var(--accent-color, #2E86AB); }
.upload-zone:hover { border-color: var(--accent-color, #2E86AB); background: #f0f7fa; }

.preview-container {
    position: relative;
}

.photo-preview {
    width: 100%;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.face-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(40,167,69,0.9);
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

.loading-indicator {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    color: var(--muted);
}

.loading-indicator.active { display: inline-flex; }

/* Payments ---------------------------------------- */
.upi-qr-placeholder {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
    background: #f0f7fa;
    text-align: center;
    color: var(--muted);
}

.upi-qr-box {
    width: 160px;
    height: 160px;
    margin: 8px auto 12px;
    border-radius: var(--radius-sm);
    border: 2px dashed var(--accent-color, #2E86AB);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--primary);
}

/* Interest modal ---------------------------------- */
.modal-shell {
    position: fixed;
    inset: 0;
    background: rgba(12,8,24,0.65);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 900;
}

.modal-shell.open { display: flex; }

.modal-panel {
    background: #fff;
    border-radius: var(--radius-lg);
    width: min(650px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: var(--shadow-md);
}

#bhavsar-details-362 .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.close-modal {
    border: none;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
}

.character-counter {
    text-align: right;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Payment plans ---------------------------------- */
.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.plan-card {
    border-radius: var(--radius-lg);
    padding: 24px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    position: relative;
}

.plan-card.selected { border-color: var(--accent-color, #2E86AB); }
.plan-card.recommended { border-color: var(--accent-color, #2E86AB); }

/* Preview-only cards (shown before BKJS ID verification) */
.plan-card-preview {
    pointer-events: none;
    opacity: 0.85;
}

.plan-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--accent-color, #2E86AB);
    color: #fff;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color, #2E86AB);
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.plan-features li {
    margin-bottom: 8px;
    color: var(--muted);
}

.payment-processing {
    margin-top: 24px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

/* Accessibility ----------------------------------- */
.skip-nav {
    position: absolute;
    left: -999px;
    top: auto;
}

.skip-nav:focus {
    position: static;
    background: #fff;
    padding: 8px;
    z-index: 1000;
}

/* Responsive tweaks -------------------------------- */
@media (max-width: 768px) {
    .registration-container { padding: 20px; }
    .registration-progress { grid-template-columns: repeat(4, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .step-navigation { flex-direction: column; }
    .upload-zones { grid-template-columns: 1fr; }
}

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

/* Locked BKJS identity fields */
.bkjs-field-locked,
input.bkjs-field-locked,
select.bkjs-field-locked {
    background: #f1f3f5 !important;
    color: #495057;
    cursor: not-allowed;
}

.gender-locked-group input[disabled] + *,
.gender-locked-group label:has(input[disabled]) {
    opacity: 0.85;
}

.gender-locked-group input[disabled] {
    cursor: not-allowed;
}

/* Location picker (work + current residence) */
.matrimony-location-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 8px;
}

.matrimony-location-grid label {
    font-size: 0.8125rem;
    color: #6c757d;
    margin-bottom: 4px;
    display: block;
}

.matrimony-location-group select,
.matrimony-location-group input[type="text"] {
    width: 100%;
}

.form-group--full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .matrimony-location-grid {
        grid-template-columns: 1fr;
    }
}

/* BKJS ID gate — Continue as… + QR scan */
.bkjs-recent-member-panel {
    background: linear-gradient(135deg, rgba(46, 134, 171, 0.08), rgba(27, 58, 75, 0.06));
    border: 1px solid rgba(46, 134, 171, 0.25);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
}

.bkjs-recent-member-panel code {
    font-size: 0.85em;
    color: var(--heading-color, #1B3A4B);
}

.bkjs-id-mode-pills .nav-link {
    color: var(--heading-color, #1B3A4B);
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

.bkjs-id-mode-pills .nav-link.active {
    background: var(--accent-color, #2E86AB);
}

.bkjs-qr-scanner-mount {
    max-width: 320px;
    min-height: 240px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8f9fa;
    border: 1px dashed rgba(46, 134, 171, 0.35);
}

.bkjs-qr-scanner-mount video {
    border-radius: 12px;
}
