@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display:ital@0;1&display=swap');

/* ==========================================================
   01. ROOT VARIABLES
   ========================================================== */

:root {
    --green: #278b38;
    --ink: #092e26;
    --muted: #61746e;
    --line: #dfe8e2;
    --pale: #f3f8f5;
}


/* ==========================================================
   02. GLOBAL STYLES & RESET
   ========================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 30px;
}

body {
    margin: 0;
    background: #fff;
    color: var(--ink);
    font-family: 'DM Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button,
a,
input,
summary {
    outline-offset: 5px;
}


/* ==========================================================
   03. HEADER & NAVIGATION
   ========================================================== */


/* Gateway Branding */

.gateway {
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -1px;
    position: relative;
}

.gateway > span:not(.gateway-icon) {
    font-weight: 400;
}

.gateway-icon {
    display: inline-grid;
    place-items: center;
    background: var(--green);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-right: 7px;
    letter-spacing: 0;
}

.gateway small {
    display: block;
    font-size: 8px;
    letter-spacing: 1.5px;
    margin: 7px 0 0 38px;
    color: var(--muted);
}

/* Navigation Links */

nav {
    display: flex;
    gap: 30px;
    font-size: 13px;
}

nav a:hover,
.source a:hover {
    text-decoration: underline;
}


/* ==========================================================
   04. HERO SECTION
   ========================================================== */

.hero {
    max-width: 900px;
    margin: auto;
    text-align: center;
    padding: 69px 24px 61px;
}

/* Eyebrow Label */

.eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--muted);
}

.eyebrow i {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    margin-right: 7px;
}

/* Logo */

.logo {
    display: block;
    width: 190px;
    height: auto;
    margin: 26px auto 27px;
}

/* Main Heading */

h1 {
   font-size: clamp(48px, 5.5vw, 74px);
    font-weight: 500;
    line-height: 1.06;
    letter-spacing: -4px;
    margin-bottom: 60px;
}

/* Highlighted Italic Text */

em {
    font-family: 'DM Serif Display', serif;
    font-weight: 400;
    color: var(--green);
}

/* Hero Introduction */

.intro {
    font-size: 16px;
    color: var(--muted);
    line-height: 1.65;
    margin: 22px 0 30px;
}


/* ==========================================================
   05. ADDRESS SEARCH FORM
   ========================================================== */

form {
    display: flex;
    align-items: center;
    padding: 7px 7px 7px 20px;
    border: 1px solid #cedcd3;
    border-radius: 40px;
    box-shadow: 0 6px 23px #123e2410;
    max-width: 750px;
    margin: auto;
    text-align: left;
}

/* Location Pin */

.pin {
    font-size: 28px;
    color: var(--green);
    margin-right: 13px;
}

/* Address Input */

input {
    border: 0;
    min-width: 0;
    flex: 1;
    background: transparent;
    padding: 13px 4px;
    color: var(--ink);
    font-size: 14px;
}

input:focus {
    outline: none;
}

/* Form Focus State */

form:focus-within {
    outline: 2px solid #278b3880;
}

/* Search Button */

form button {
    background: var(--green);
    color: white;
    border: 0;
    border-radius: 30px;
    padding: 16px 23px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}

form button:hover {
    background: #1f742e;
}

form button span {
    margin-left: 12px;
}

/* Search Hint */

.hint {
    color: #798b82;
    font-size: 11px;
    margin: 13px 0 30px;
}

/* Manual Location Selection */

.manual {
    font-size: 12px;
    color: var(--ink);
}

.manual span {
    margin-left: 12px;
    color: var(--green);
}


/* ==========================================================
   09. EXPANDABLE INFORMATION / FAQ
   ========================================================== */

details {
    border-top: 1px solid var(--line);
    font-size: 12px;
}

/* Accordion Heading */

summary {
    padding: 19px 0;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
}

summary::-webkit-details-marker {
    display: none;
}

summary span {
    color: var(--green);
}

/* Accordion Content */

details p {
    font-size: 12px;
    line-height: 1.7;
    color: var(--muted);
    max-width: 850px;
    margin-top: 0;
}


/* ==========================================================
   10. SOURCES & REFERENCES
   ========================================================== */

.source {
    font-size: 10px;
    color: var(--muted);
    margin: 0 0 6px;
}

.source a {
    color: var(--green);
}


/* ==========================================================
   11. SEARCH RESULTS
   ========================================================== */

.result {
    max-width: 700px;
    margin: 20px auto;
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 12px;
    text-align: left;
    font-size: 13px;
    line-height: 1.7;
    background: var(--pale);
}

.result strong {
    display: block;
}

.result a {
    color: var(--green);
    text-decoration: underline;
}


/* ==========================================================
   12. FOOTER
   ========================================================== */

footer {
    border-top: 1px solid #eef1ef;
    padding: 24px 6%;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: var(--muted);
    font-size: 10px;
}

.dot {
    margin: 0 7px;
}


/* ==========================================================
   13. ACCESSIBILITY UTILITIES
   ========================================================== */

/* Visually Hidden Content for Screen Readers */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}


/* ==========================================================
   14. LARGE SCREEN STYLES
   Screens wider than 1500px
   ========================================================== */

@media (min-width: 1500px) {

    .hero {
        padding-top: 95px;
        padding-bottom: 80px;
    }

}


/* ==========================================================
   15. MOBILE RESPONSIVE STYLES
   Screens 700px and below
   ========================================================== */

@media (max-width: 700px) {

    /* ------------------------------------------------------
       Header & Navigation
       ------------------------------------------------------ */

    header {
        padding: 23px 6%;
    }

    nav {
        font-size: 11px;
    }

    .gateway {
        font-size: 17px;
    }


    /* ------------------------------------------------------
       Hero Section
       ------------------------------------------------------ */

    .hero {
        padding-top: 45px;
        padding-bottom: 45px;
    }

    h1 {
        letter-spacing: -2px;
    }

    .intro {
        font-size: 14px;
    }

    .eyebrow {
        font-size: 8px;
    }


    /* ------------------------------------------------------
       Address Search Form
       ------------------------------------------------------ */

    form {
        flex-wrap: wrap;
        border-radius: 20px;
        padding: 10px 12px;
    }

    .pin {
        font-size: 23px;
        margin-right: 7px;
    }

    input {
        font-size: 12px;
        padding: 13px 0;
    }

    form button {
        width: 100%;
        margin-top: 6px;
    }

    .hint {
        font-size: 10px;
        line-height: 1.6;
    }


    /* ------------------------------------------------------
       Footer
       ------------------------------------------------------ */

    footer {
        flex-wrap: wrap;
        font-size: 10px;
    }

    footer > span:nth-child(2) {
        display: none;
    }

}


/* ==========================================================
   NAIJA BALLOT â€” ELECTORAL GUIDE REDESIGN
   ========================================================== */


/* ----------------------------------------------------------
   01. GUIDE CONTAINER
   ---------------------------------------------------------- */

.guide {
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 55px 44px 35px;
    background: #f7faf8;
    border: 1px solid #edf2ee;
    border-radius: 24px;
}


/* ----------------------------------------------------------
   02. CENTERED HEADING
   ---------------------------------------------------------- */

.section-top {
    display: block;
    text-align: center;
    margin-bottom: 40px;
}

.guide-heading {
    max-width: 850px;
    margin: 0 auto;
}

.guide-eyebrow {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--muted);
    margin-bottom: 20px;
}

.guide-heading h3 {
    font-size: 24px;
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.9px;
    margin: 0 0 20px;
    color: var(--ink);
}

.guide-heading h3 em {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    color: var(--green);
}

.guide-tagline {
    font-size: 17px;
    font-weight: 500;
    color:#666;
    margin: 0 0 14px;
    line-height: 1.5;
    letter-spacing:-0.5px;
}

.guide-description {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.8;
    color: var(--muted);
    margin: 0 auto;
}


/* ----------------------------------------------------------
   03. PILL-SHAPED TAB NAVIGATION
   ---------------------------------------------------------- */

.tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 50px;
    margin-bottom: 22px;
}

/* Individual Tab */

.tabs button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;

    padding: 16px 20px;

    background: transparent;
    border: 1px solid transparent;
    border-radius: 50px;

    color: var(--muted);
    text-align: left;
    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

/* Tab Icons */

.tabs button svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: currentColor;
}

/* Tab Text Container */

.tabs button > .tab-copy {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0;
    color: inherit;
    font-size: inherit;
}

/* Tab Title */

.tabs .tab-copy strong {
    font-size: 14px;
    font-weight: 600;
    color: inherit;
}

/* Tab Subtitle */

.tabs .tab-copy small {
    display: block;
    margin: 0;
    font-size: 10px;
    font-weight: 400;
    color: inherit;
    opacity: 0.75;
}

/* Hover State */

.tabs button:hover {
    color: var(--green);
    background: #f5faf6;
}

/* Active Tab */

.tabs button[aria-selected="true"] {
    background: #f0f8f1;
    border-color: #b9ddc1;
    color: var(--green);
    box-shadow: 0 2px 8px #092e2608;
}


/* ----------------------------------------------------------
   04. ELECTORAL CONTENT PANEL
   ---------------------------------------------------------- */

#panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;

    padding: 32px 25px;
    min-height: 150px;

    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
}

/* Individual Office */

.office {
    border-left: 1px solid #dce9df;
    padding-left: 20px;
}

.office h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px;
    color: var(--ink);
}

.office p {
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
    color: var(--muted);
}

.office small {
    display: block;
    margin-top: 12px;
    font-size: 14px;
    color: var(--green);
}

/* Notes Spanning the Full Panel */

.level-note {
    grid-column: 1 / -1;
    padding-top: 20px;
    border-top: 1px solid var(--line);
    margin: 0;
    font-size: 11px;
    line-height: 1.7;
    color: var(--muted);
}


/* ----------------------------------------------------------
   05. ACCORDION
   ---------------------------------------------------------- */

.guide details {
    margin-top: 25px;
    border-top: 1px solid var(--line);
}

.guide summary {
    padding: 20px 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink);
}

.guide summary span {
    color: var(--green);
}

.guide details p {
    font-size: 12px;
    line-height: 1.8;
    color: var(--muted);
}


/* ----------------------------------------------------------
   06. SOURCE LINK
   ---------------------------------------------------------- */

.guide .source {
    font-size: 10px;
    margin-top: 10px;
    color: var(--muted);
}

.guide .source a {
    color: var(--green);
}


/* ==========================================================
   RESPONSIVE â€” TABLET
   ========================================================== */

@media (max-width: 900px) {

    .guide {
        margin: 0 20px 45px;
        padding: 45px 28px 30px;
    }

    .guide-heading h3 {
        font-size: 20px;
    }

    .tabs button {
        gap: 10px;
        padding: 14px 12px;
    }

    #panel {
        gap: 18px;
        padding: 25px 20px;
    }

}


/* ==========================================================
   RESPONSIVE â€” MOBILE
   ========================================================== */

@media (max-width: 700px) {

    /* Guide Container */

    .guide {
        margin: 0 16px 35px;
        padding: 35px 18px 25px;
        border-radius: 20px;
    }

    /* Heading */

    .section-top {
        margin-bottom: 30px;
    }

    .guide-eyebrow {
        font-size: 9px;
        margin-bottom: 18px;
    }

    .guide-heading h3 {
        font-size: 18px;
        line-height: 1.4;
        letter-spacing: -0.3px;
        margin-bottom: 18px;
    }

    .guide-tagline {
        font-size: 15px;
    }

    .guide-description {
        font-size: 12px;
        line-height: 1.7;
    }

    .guide-description br {
        display: none;
    }

    /* Tabs */

    .tabs {
        padding: 3px;
        border-radius: 16px;
    }

    .tabs button {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 7px;

        padding: 13px 5px;
        border-radius: 13px;
        text-align: center;
    }

    .tabs button svg {
        width: 21px;
        height: 21px;
    }

    .tabs button > .tab-copy {
        align-items: center;
        gap: 3px;
    }

    .tabs .tab-copy strong {
        font-size: 12px;
    }

    .tabs .tab-copy small {
        font-size: 9px;
    }

    /* Content Panel */

    #panel {
        grid-template-columns: 1fr;
        gap: 22px;
        padding: 25px 20px;
        border-radius: 15px;
    }

    .office {
        padding-left: 15px;
    }

    .office h3 {
        font-size: 14px;
    }

    .office p {
        font-size: 12px;
    }

    .level-note {
        padding-top: 18px;
    }

}


/* ==========================================================
   ACCESSIBILITY â€” REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    .tabs button {
        transition: none;
    }

}


/* ========================================
   NAIJA BALLOT â€” LANDMARK STICKY BACKGROUND
   ========================================= */

.landmark-footer {
    position: fixed;
    opacity: 0.2; /* 20% opacity */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 320px;
    background: url("assets/nigeria-landmarks.png") center bottom / 100% auto no-repeat;
    pointer-events: none;
    z-index: 1;
}

main {
    position: relative;
    z-index: 2;
    padding-bottom: 180px;
}

@media (max-width: 700px) {
    .landmark-footer {
        height: 180px;
        background-size: auto 180px;
    }

    main {
        padding-bottom: 120px;
    }
}

/* GOOGLE ADDRESS AUTOCOMPLETE */

#google-address-container {
    flex: 1;
    min-width: 0;
}

#google-address {
    display: block;
    width: 100%;
    color-scheme: light;
    --gmpx-color-surface: #ffffff;
    --gmpx-color-on-surface: #092e26;
    --gmpx-font-family-base: "DM Sans", sans-serif;
    --gmpx-font-size-base: 14px;
}

#address-status {
    margin: 14px auto;
    font-size: 13px;
    color: #278b38;
    text-align: center;
}

/* GEOCODING RESULT PANEL */

#result.result {
    max-width: 1000px;
    width: 100%;
    margin: 28px auto;
    padding: 25px;
    border: 1px solid #dce8df;
    border-radius: 18px;
    background: #f8faf8;
    text-align: left;
}

#result[hidden] {
    display: none !important;
}

#result h3 {
    margin: 0 0 18px;
    font-size: 18px;
    color: #092e26;
}

#geocode-output {
    display: block;
    max-height: 550px;
    overflow: auto;
    padding: 20px;
    border-radius: 12px;
    background: #ffffff;
    color: #263d34;
    font-family: monospace;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    #result.result {
        padding: 15px;
    }

    #geocode-output {
        font-size: 11px;
        padding: 12px;
    }
}

/* Remove Google Autocomplete input border */

gmp-place-autocomplete {
    width: 100%;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* Style the internal Google input */

gmp-place-autocomplete::part(input) {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}

/* Remove focus border */

gmp-place-autocomplete:focus,
gmp-place-autocomplete:focus-within {
    outline: none !important;
    box-shadow: none !important;
}


/* =========================================
   NAIJA BALLOT â€” ADDRESS CONFIRMATION
   ========================================= */

/* Disabled search button */

#find-candidates:disabled {
    background: #a9cbb0 !important;
    color: #ffffff !important;
    cursor: not-allowed;
    opacity: 0.65;
}

#find-candidates:not(:disabled) {
    background: #278b38;
    color: #ffffff;
    cursor: pointer;
    transition: background .25s ease, transform .25s ease;
}

#find-candidates:not(:disabled):hover {
    background: #1d742e;
}

/* Result container */

#result.result {
    max-width: 780px;
    width: 100%;
    margin: 26px auto 45px;
    padding: 0;
    border: none;
    background: transparent;
}

#result[hidden],
#address-loading[hidden],
#address-confirmation[hidden] {
    display: none !important;
}

/* Loading card */

.address-loading {
    background: #f7faf8;
    border: 1px solid #dfe9e2;
    border-radius: 20px;
    padding: 26px 28px;
    box-shadow: 0 12px 35px rgba(9, 46, 38, .04);
}

.loading-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.loading-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #e5f3e8;
    color: #278b38;
    font-size: 26px;
    flex-shrink: 0;
}

.loading-heading > div {
    flex: 1;
    min-width: 0;
}

.loading-heading strong {
    display: block;
    color: #092e26;
    font-size: 15px;
    font-weight: 600;
}

.loading-heading p {
    margin: 4px 0 0;
    color: #61746e;
    font-size: 13px;
}

#loading-percentage {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -1px;
    color: #278b38;
    font-variant-numeric: tabular-nums;
}

/* Progress bar */

.loading-track {
    height: 6px;
    width: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: #e2ece5;
}

.loading-progress {
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #278b38,
        #48b85a
    );
    transition: width .12s ease;
}

/* Confirmation card */

.address-confirmation {
    background: #ffffff;
    border: 1px solid #dfe9e2;
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 15px 45px rgba(9, 46, 38, .045);
    animation: addressReveal .35s ease both;
}

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

/* Card heading */

.address-card-top {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e6eee8;
}

.address-marker {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    background: #e8f6eb;
    color: #278b38;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.address-card-heading {
    flex: 1;
    min-width: 0;
}

.address-eyebrow {
    display: block;
    color: #278b38;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.3px;
    margin: 3px 0 8px;
}

.address-card-heading h3 {
    font-family: "DM Sans", sans-serif;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -.5px;
    margin: 0 0 6px;
    color: #092e26;
}

.address-card-heading p {
    margin: 0;
    font-size: 13px;
    color: #61746e;
}

.address-check {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #278b38;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

/* Address breakdown */

.address-detail span {
    display: block;
    margin-bottom: 7px;
    color: #84938b;
    font-size: 12px;
}

.address-detail strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #092e26;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* Confirmation prompt */

.address-prompt {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f1f7f2;
    border-radius: 12px;
    padding: 18px;
}

.prompt-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #278b38;
    color: white;
    font-size: 13px;
}

.address-prompt strong {
    display: block;
    font-size: 14px;
    color: #092e26;
    margin-bottom: 5px;
}

.address-prompt p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #61746e;
}

/* Shown when Google only placed the centre of a general area. */
.address-precision-note {
    margin: 0 0 14px;
    padding: 14px 18px;
    border-radius: 12px;
    background: #fff8e6;
    color: #7a5a00;
    font-size: 13px;
    line-height: 1.6;
}

.address-prompt b {
    color: #278b38;
}

/* Mobile */

@media (max-width: 700px) {

    .address-confirmation,
    .address-loading {
        padding: 20px;
        border-radius: 16px;
    }


    .address-card-heading h3 {
        font-size: 16px;
    }

    .address-marker {
        width: 40px;
        height: 40px;
    }

    #loading-percentage {
        font-size: 18px;
    }
}

.address-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 24px;
    padding: 28px 4px;
}


/* MOBILE */

@media (max-width: 700px) {
    .address-details {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px 16px;
    }
}

@media (max-width: 420px) {
    .address-details {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}


/* ==========================================================
   GOOGLE PLACES â€” CLEAN FOCUS TREATMENT
   Keep focus visible on the outer search bar only.
   ========================================================== */

gmp-place-autocomplete::part(input),
gmp-place-autocomplete::part(input):focus {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

gmp-place-autocomplete::part(focus-ring) {
    display: none !important;
}

#search:focus-within {
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(39, 139, 56, 0.12);
}
/* Address card: asynchronous, provisional constituency values. */
.address-detail strong.is-pending {
    color: #84938b;
    font-weight: 500;
}
