/* =====================================================================
   RJD (Rashtriya Janata Dal) theme
   Loaded after each page's own styles, so these rules win.
   Colours: party green + white, lantern-flame yellow as accent.
   ===================================================================== */
:root {
    --rjd-green: #0B7A3B;
    --rjd-green-dark: #055A2B;
    --rjd-green-soft: #E8F5EC;
    --rjd-yellow: #FFC21A;
    --rjd-flame: #E8530E;
    --rjd-ink: #17271D;
    --rjd-muted: #5B6B61;
    --rjd-line: #CFDDD3;
    --rjd-error: #C62828;
    --rjd-radius: 16px;
    --rjd-font: 'Mukta', 'Nirmala UI', 'Noto Sans Devanagari', 'Lexend', sans-serif;

    /* repaint the old blue design system in style.css with RJD colours */
    --p-ink: #17271D;
    --p-ink-soft: #3B4D41;
    --p-muted: #5B6B61;
    --p-brand: #0B7A3B;
    --p-brand-2: #12964B;
    --p-brand-700: #055A2B;
    --p-saffron: #FFC21A;
    --p-green: #0B7A3B;
    --p-line: #CFDDD3;
    --p-bg: #F4F8F5;
    --p-shadow: 0 20px 50px -22px rgba(5, 90, 43, .35), 0 6px 16px -12px rgba(5, 90, 43, .2);
    --p-shadow-lg: 0 40px 100px -34px rgba(5, 90, 43, .45);
    --p-ring: 0 0 0 4px rgba(11, 122, 59, .16);
    --p-grad: linear-gradient(135deg, #12964B 0%, #0B7A3B 55%, #055A2B 100%);
}

/* old style.css forces "* { color:#000; font-size:15px }" which breaks inheritance */
* { color: inherit; font-size: inherit; }

html, body {
    font-family: var(--rjd-font) !important;
    background: #F4F8F5 !important;
    color: var(--rjd-ink);
    font-size: 18px;
}

h1, h2, h3, h4, h5, h6, p, label, input, select, button, textarea, a {
    font-family: var(--rjd-font) !important;
}

/* ---------- brand bar ---------- */
.rjd-bar {
    position: sticky; top: 0; z-index: 3000;
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px;
    background: var(--rjd-green);
    color: #fff;
    box-shadow: 0 4px 14px rgba(5, 90, 43, .25);
}
.rjd-bar a.rjd-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.rjd-bar img { width: 44px; height: 44px; padding: 0 !important; flex: none; }
.rjd-bar .rjd-name { line-height: 1.1; min-width: 0; }
.rjd-bar .rjd-name b { display: block; font-size: 20px; font-weight: 800; white-space: nowrap; }
.rjd-bar .rjd-name small { display: block; font-size: 12px; letter-spacing: 2px; opacity: .85; white-space: nowrap; }
.rjd-bar .rjd-spacer { flex: 1; }
.rjd-lang { display: flex; background: rgba(255,255,255,.15); border-radius: 999px; padding: 3px; flex: none; }
.rjd-lang button {
    width: auto !important; margin: 0 !important; border: 0 !important;
    background: transparent !important; color: #fff !important;
    font-size: 15px !important; font-weight: 700; padding: 6px 12px !important;
    border-radius: 999px !important; line-height: 1.2;
}
.rjd-lang button.active { background: #fff !important; color: var(--rjd-green) !important; }
.rjd-home {
    flex: none; width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.15); color: #fff !important; font-size: 20px; text-decoration: none;
}
@media (max-width: 420px) {
    .rjd-bar .rjd-name small { display: none; }
    .rjd-bar .rjd-name b { font-size: 17px; }
    .rjd-bar img { width: 38px; height: 38px; }
    .rjd-lang button { padding: 6px 9px !important; font-size: 14px !important; }
}

/* the old floating Congress language picker is replaced by the brand bar */
.site-lang-wrap, #languageSelect { display: none !important; }

/* ---------- page headings ---------- */
h1, h2 { color: var(--rjd-green) !important; }
.rjd-title { text-align: center; margin: 18px 0 10px; }
.rjd-title b { display: block; font-size: 30px; font-weight: 800; color: var(--rjd-green); line-height: 1.2; }
.rjd-title small { display: block; font-size: 14px; letter-spacing: 3px; color: var(--rjd-muted); font-weight: 600; }
.heading-en { font-size: .75em; color: var(--rjd-muted); font-weight: 500; }

/* ---------- banners ---------- */
.img-laptop, .img-mobile { border-radius: 24px; }
.img-laptop { margin-top: 18px; padding: 0 !important; }
.img-mobile { padding: 0 !important; margin-top: 12px; }

/* ---------- cards ---------- */
.card.sign-up, .card.voter-not-found, .card.membership, .card.meetings {
    border: 0 !important;
    border-radius: 22px !important;
    background: #fff;
    box-shadow: 0 10px 30px -12px rgba(5, 90, 43, .25);
    border-top: 6px solid var(--rjd-green) !important;
}

/* ---------- form labels (bigger, darker, with icon) ---------- */
.form-group > p.mb-0, .form-group > label, .form-label, .non-voter label, .sign label {
    color: var(--rjd-ink) !important;
    font-size: 18px !important;
    font-weight: 700;
    margin-bottom: 6px !important;
    display: flex; align-items: center; gap: 8px; flex-wrap: nowrap;
}
/* the speaker button stays beside its label; long label text wraps on its own */
.form-group > p.mb-0 .rjd-speak, .form-group > label .rjd-speak { margin-left: 2px !important; }
.rjd-ico { font-size: 22px; line-height: 1; }

/* ---------- inputs: big boxed fields instead of thin underline ---------- */
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="date"], select, textarea {
    width: 100%;
    min-height: 54px;
    border: 2px solid var(--rjd-line) !important;
    border-radius: 12px !important;
    padding: 10px 14px !important;
    font-size: 19px !important;
    background-color: #fff;
    color: var(--rjd-ink) !important;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--rjd-green) !important;
    box-shadow: 0 0 0 4px rgba(11, 122, 59, .15) !important;
    outline: none;
}
input::placeholder { color: #8A988F; }
input[readonly] { background: #F4F8F5; }

input[type="radio"], input[type="checkbox"] { accent-color: var(--rjd-green) !important; }
.form-check-input:checked { background-color: var(--rjd-green) !important; border-color: var(--rjd-green) !important; }
.form-check-input { width: 26px !important; height: 26px !important; margin-right: 10px; }
.form-check { display: flex; align-items: center; gap: 6px; }
.form-check-label { font-size: 17px !important; }

/* gender radio: big tappable tiles */
.gender-container {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border: 2px solid var(--rjd-line); border-radius: 14px; padding: 10px 6px; cursor: pointer;
}
.gender-container:has(input:checked) { border-color: var(--rjd-green); background: var(--rjd-green-soft); }
.gender-container label { margin: 0 !important; font-size: 19px !important; }

/* "Get OTP" link becomes a real button */
#getOtpButton {
    float: none !important;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 10px; padding: 10px 18px !important;
    border: 0 !important; border-radius: 12px;
    background: var(--rjd-yellow); color: #3A2A00 !important;
    font-weight: 800; font-size: 17px !important; text-decoration: none;
}
#getOtpButton::before { content: "📩"; }

/* ---------- buttons ---------- */
button#submitBtn, .sign-up button, .voter-not-found button[type="submit"], .meetings button,
.btn-green, .btn-orange, .btn-primary, .btn-success, .razorpay-payment-button {
    background: var(--rjd-green) !important;
    border: 0 !important;
    color: #fff !important;
    border-radius: 14px !important;
    min-height: 56px;
    font-size: 20px !important;
    font-weight: 800 !important;
    padding: 10px 16px !important;
    width: 100%;
    box-shadow: 0 6px 16px -6px rgba(5, 90, 43, .55);
}
button#submitBtn:hover, .btn-green:hover, .btn-primary:hover, .btn-success:hover { background: var(--rjd-green-dark) !important; }
.btn-orange { background: var(--rjd-yellow) !important; color: #3A2A00 !important; }
.btn-orange:hover { background: #F2B200 !important; }
button:disabled { opacity: .6; }
.btn-close { width: auto !important; min-height: 0 !important; box-shadow: none !important; }

/* ---------- errors & success ---------- */
.error-message, .error, #errorMessages, #mobileerrorMessages, .text-danger {
    color: var(--rjd-error) !important;
    font-size: 16px; font-weight: 600; margin-top: 6px;
}
.error-message:not(:empty)::before, #errorMessages:not(:empty)::before, #mobileerrorMessages:not(:empty)::before { content: "⚠️ "; }
#otpSuccessMessage { color: var(--rjd-green) !important; font-weight: 700; margin-top: 8px; }
.text-success { color: var(--rjd-green) !important; }

/* ---------- speak (listen) buttons ---------- */
html body button.rjd-speak {
    padding: 0 !important; transform: none !important;
    width: 34px !important; height: 34px; min-height: 0 !important; flex: none;
    margin: 0 !important; padding: 0 !important;
    border: 0 !important; border-radius: 50% !important;
    background: var(--rjd-green-soft) !important; color: var(--rjd-green) !important;
    font-size: 17px !important; line-height: 34px; cursor: pointer; box-shadow: none !important;
}
html body button.rjd-speak.speaking { background: var(--rjd-yellow) !important; }

html body button.rjd-help {
    position: fixed; right: 16px; bottom: 18px; z-index: 3500;
    width: auto !important; min-height: 0 !important; margin: 0 !important;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 18px !important; border: 0 !important; border-radius: 999px !important;
    background: var(--rjd-flame) !important; color: #fff !important;
    font-size: 18px !important; font-weight: 800; cursor: pointer;
    box-shadow: 0 10px 24px -8px rgba(232, 83, 14, .7) !important;
    animation: rjd-pulse 2s ease-in-out 3;
}
html body button.rjd-help.speaking { background: var(--rjd-green) !important; }
@keyframes rjd-pulse { 50% { transform: scale(1.08); } }
/* phones: round icon-only help button, and room at the end of the page so it never hides the last button */
@media (max-width: 576px) {
    html body button.rjd-help {
        right: 12px; bottom: 14px; width: 54px !important; height: 54px; padding: 0 !important;
        justify-content: center; font-size: 24px !important;
    }
    .rjd-help .rjd-help-label { display: none; }
    body.rjd-has-help { padding-bottom: 80px !important; }
}

/* step indicator: 1 → 2 → 3 */
.rjd-steps { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 4px 0 14px; }
.rjd-steps span {
    width: 38px; height: 38px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--rjd-green-soft); color: var(--rjd-green); font-weight: 800; font-size: 18px;
}
.rjd-steps span.on { background: var(--rjd-green); color: #fff; }
.rjd-steps i { width: 26px; height: 3px; background: var(--rjd-line); border-radius: 2px; }

/* home screen choice tiles */
.rjd-choice {
    display: flex !important; align-items: center; gap: 14px;
    width: 100%; text-align: left;
    min-height: 92px; margin: 0 0 14px !important; padding: 14px 16px !important;
    border-radius: 18px !important; border: 0 !important;
    color: #fff !important; text-decoration: none;
    box-shadow: 0 8px 20px -10px rgba(0,0,0,.45);
}
.rjd-choice .ico {
    flex: none; width: 60px; height: 60px; border-radius: 16px;
    background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 34px;
}
.rjd-choice .txt b { display: block; font-size: 22px; font-weight: 800; line-height: 1.2; }
.rjd-choice .txt small { display: block; font-size: 15px; opacity: .92; }
.rjd-choice .arrow { margin-left: auto; font-size: 28px; opacity: .9; }
.rjd-choice.c1 { background: var(--rjd-green) !important; }
.rjd-choice.c2 { background: linear-gradient(135deg, #E8530E, #F08A1C) !important; }
.rjd-choice.c3 { background: linear-gradient(135deg, #1F6F8B, #2A93B5) !important; }
.rjd-choice:hover { filter: brightness(1.05); color: #fff !important; }

/* photo / file pickers: whole row is tappable */
#fileNameDisplayPhoto, #fileNameDisplayVoter { cursor: pointer; padding-right: 54px !important; }
#photo-uploadLabel, #voter-uploadLabel {
    position: absolute; right: 8px; bottom: 7px; margin: 0 !important;
    width: 42px; height: 42px; border-radius: 10px; background: var(--rjd-green-soft);
    display: flex !important; align-items: center; justify-content: center; font-size: 22px;
}
#photo-uploadLabel i, #voter-uploadLabel i { display: none; }
#photo-uploadLabel::after { content: "📷"; }
#voter-uploadLabel::after { content: "🪪"; }
.rjd-photo-preview { display: block; width: 96px; height: 96px; object-fit: cover; border-radius: 14px; margin-top: 8px; border: 3px solid var(--rjd-green-soft); padding: 0 !important; }

/* organisations / cells checklist */
.rjd-orgs h6 { font-weight: 800; color: var(--rjd-green); font-size: 19px; }
.rjd-org {
    display: flex; align-items: center; gap: 12px;
    border: 2px solid var(--rjd-line); border-radius: 14px;
    padding: 10px 12px; margin-bottom: 10px; cursor: pointer;
}
.rjd-org:has(input:checked) { border-color: var(--rjd-green); background: var(--rjd-green-soft); }
.rjd-org input { width: 26px !important; height: 26px; min-height: 0 !important; flex: none; margin: 0 !important; }
.rjd-org .ico { font-size: 26px; flex: none; }
.rjd-org b { display: block; font-size: 18px; color: var(--rjd-ink); line-height: 1.2; }
.rjd-org small { display: block; color: var(--rjd-muted); font-size: 14px; }

/* SweetAlert: big friendly popups */
.swal2-popup { font-family: var(--rjd-font) !important; font-size: 18px !important; border-radius: 20px !important; }
.swal2-styled.swal2-confirm { background: var(--rjd-green) !important; font-size: 19px !important; min-width: 120px; border-radius: 12px !important; }

body { padding-bottom: 80px; }

/* old pages pushed the main button far down (margin: 45%) */
button#submitBtn { margin: 24px 0 12px !important; }
.sign-up .sign { padding: 0 6% !important; margin-top: 18px !important; }
.sign-up .sign i { position: static; margin: 0; }
@media (max-width: 768px) { .sign-up .sign { padding: 0 !important; } .card.sign-up, .card.voter-not-found { margin: 0 4px 20px !important; padding: 18px 14px !important; } }

/* bootstrap .row inside a padding-less .container-fluid overflowed phones by ~14px */
.container-fluid { padding-left: 12px !important; padding-right: 12px !important; overflow-x: clip; }
html, body { overflow-x: clip; }

/* the old floating fake-placeholder over the referral field is replaced by a real placeholder (rjd-assist.js) */
#customPlaceholder { display: none !important; }
.rjd-org > span:last-child { flex: 1; min-width: 0; }

/* ---------- screen banners ---------- */
/* desktop: banner stays in view and never grows taller than the screen */
@media (min-width: 992px) {
    .rjd-side { position: sticky; top: 76px; }
    .rjd-side img.img-laptop.rjd-banner, .rjd-side .rjd-hero { max-height: calc(100vh - 300px); width: auto !important; max-width: 100%; margin: 18px auto 0; display: block; }
}
/* leader-photo banner (used when a photo is placed in images/rjd/leaders/) */
.rjd-hero { position: relative; border-radius: 24px; overflow: hidden; margin-top: 12px; background: var(--rjd-green); aspect-ratio: 4 / 3.6; }
@media (min-width: 992px) { .rjd-hero { aspect-ratio: 700 / 860; width: 100% !important; } }
.rjd-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 35%; padding: 0 !important; }
@media (min-width: 992px) { .rjd-hero > img { object-position: top center; } }
.rjd-hero-text {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px;
    background: linear-gradient(180deg, rgba(5,90,43,0) 0%, rgba(5,90,43,.8) 35%, rgba(5,90,43,.95) 100%);
    color: #fff;
}
.rjd-hero-brand { display: flex; align-items: center; gap: 10px; }
.rjd-hero-brand img { width: 44px; height: 44px; padding: 0 !important; }
.rjd-hero-brand b { display: block; font-size: 22px; font-weight: 800; line-height: 1.1; }
.rjd-hero-brand small { display: block; font-size: 11px; letter-spacing: 2px; color: #CFEBD9; }
.rjd-hero-text strong { display: block; margin-top: 8px; font-size: 28px; font-weight: 800; color: #FFD54F; line-height: 1.2; }
.rjd-hero-text em { display: block; font-style: normal; font-size: 16px; }
/* old style.css paints the banner column cream */
[class*="col-"]:has(> .rjd-side) { background: transparent !important; }

/* ---------- "our leaders" strip ---------- */
.rjd-leaders { text-align: center; margin: 14px auto 6px; max-width: 520px; }
.rjd-leaders-title { font-weight: 800; color: var(--rjd-green); font-size: 18px; margin: 0 0 8px; }
.rjd-leaders-row { display: flex; justify-content: center; gap: 18px; }
.rjd-leaders figure { margin: 0; width: 110px; }
.rjd-leaders figure img {
    width: 92px; height: 92px; border-radius: 50%; object-fit: cover; padding: 0 !important;
    border: 4px solid #fff; box-shadow: 0 0 0 3px var(--rjd-green), 0 8px 18px -8px rgba(5,90,43,.6);
}
.rjd-leaders figcaption { margin-top: 8px; font-weight: 700; font-size: 15px; line-height: 1.2; color: var(--rjd-ink); }
.rjd-credits { margin-top: 8px; font-size: 12px; color: var(--rjd-muted); }
.rjd-credits summary { cursor: pointer; display: inline-block; }
.rjd-credits p { margin: 4px 0 0; line-height: 1.4; }
.rjd-credits a { color: var(--rjd-green); }
@media (max-width: 480px) {
    .rjd-leaders-row { gap: 10px; }
    .rjd-leaders figure { width: 96px; }
    .rjd-leaders figure img { width: 74px; height: 74px; }
    .rjd-leaders figcaption { font-size: 13px; }
}
@media (max-width: 991px) {
    .rjd-hero-text { padding: 12px 16px; }
    .rjd-hero-brand img { width: 34px; height: 34px; }
    .rjd-hero-brand b { font-size: 18px; }
    .rjd-hero-text strong { font-size: 24px; margin-top: 4px; }
    .rjd-hero-text em { font-size: 14px; }
}

/* old Congress-style tricolour hairline at the top of every page -> RJD lantern-yellow line */
body::before { background: var(--rjd-yellow) !important; height: 3px !important; }
