/* =========================
   General
   ========================= */

* {
    box-sizing: border-box;
}

#DB{
    color:#3F7188;
}

body {
    margin: 0;

    background: #f7f5ef;
    color: #3e403c;

    font-family: "Segoe UI", Arial, sans-serif;
}


/* =========================
   Header
   ========================= */

header {
    position: relative;

    width: 100%;
    height: 320px;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #a8b3a1;
}



/* Soft green overlay */
header::after {
    content: "";

    position: absolute;
    inset: 0;

    background: rgba(63, 81, 69, 0.18);
}

header h1 {
    position: relative;
    z-index: 1;

    margin: 0;
    padding: 16px 40px;

    color: #3f5145;

    background: rgba(247, 245, 239, 0.92);

    border-radius: 12px;

    font-family: Georgia, "Times New Roman", serif;

    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: normal;
    text-align:center;
    letter-spacing: 2px;

    box-shadow:
        0 8px 30px rgba(50, 65, 55, 0.15);
}

#Intro h2 {
    margin: 0 0 15px;

    color: #3f5145;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 2.2rem;
    font-weight: normal;
}

#Intro p {
    margin: 0 0 10px;

    color: #646a63;

    font-size: 1rem;
    line-height: 1.7;
}
/* =========================
   Birth list banner
   ========================= */

#Banner {
    width: min(900px, calc(100% - 40px));

    margin: 45px auto;

    display: flex;
    align-items: center;

    gap: 35px;

    padding: 30px 40px;

    background: #fffdf9;

    border: 1px solid #d9ded5;

    border-left: 6px solid #71806d;

    border-radius: 18px;

    box-shadow:
        0 10px 35px rgba(60, 75, 65, 0.08);

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-left-color 0.25s ease;
}

#Banner:hover {
    transform: translateY(-4px);

    border-left-color: #3f5145;

    box-shadow:
        0 15px 40px rgba(60, 75, 65, 0.15);
}


/* =========================
   QR code
   ========================= */

#QR {
    flex: 0 0 150px;

    display: flex;
    align-items: center;
    justify-content: center;
}

#QR img {
    display: block;

    width: 150px;
    height: 150px;

    padding: 8px;

    background: #ffffff;

    border: 1px solid #d9ded5;

    border-radius: 10px;
}


/* =========================
   Banner text
   ========================= */

#TEXT {
    flex: 1;
}

#TEXT h6 {
    margin: 0 0 10px;

    color: #3f5145;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 2rem;
    font-weight: normal;
}

#TEXT p {
    margin: 0;

    color: #646a63;

    font-size: 1rem;
    line-height: 1.7;
}


/* =========================
   Main content
   ========================= */

#Main {
    width: min(900px, calc(100% - 40px));

    margin: 0 auto 60px;

    min-height: 300px;

    background: #fffdf9;

    border-radius: 18px;

    box-shadow:
        0 8px 30px rgba(60, 75, 65, 0.05);
}

/* =========================
   Main statistics card
   ========================= */

#Main {
    width: min(900px, calc(100% - 40px));

    margin: 0 auto 60px;

    padding: 0;

    background: transparent;
}


/* =========================
   Statistics
   ========================= */

#stats,#Intro {
    padding: 40px;

    background: #fffdf9;

    border: 1px solid #dfe3db;
    border-radius: 18px;

    margin-bottom:20px;
    box-shadow:
        0 10px 35px rgba(60, 75, 65, 0.08);
}


/* =========================
   Main title
   ========================= */

#stats h2 {
    margin: 0 0 8px;

    color: #3f5145;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 2.2rem;
    font-weight: normal;
}

#stats h2 + p {
    margin: 0 0 35px;

    color: #73776f;

    font-size: 0.95rem;
}

#stats h2 + p span {
    color: #3f5145;
    font-weight: 600;
}


/* =========================
   Section headings
   ========================= */

#stats h3 {
    margin: 35px 0 15px;
    padding-bottom: 8px;

    color: #596b5c;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 1.35rem;
    font-weight: normal;

    border-bottom: 1px solid #dfe3db;
}


/* =========================
   Gender summary
   ========================= */

#stats h3 + p {
    color: #646a63;
}


/* =========================
   Vote result rows
   ========================= */

#stats p {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 44px;

    margin: 7px 0;
    padding: 10px 14px;

    overflow: hidden;

    color: #4c514b;

    background: #f1f3ee;

    border-radius: 8px;

    font-size: 0.95rem;

    z-index: 0;
}


/* Percentage background bar */
#stats p::before {
    content: "";

    position: absolute;
    inset: 0;

    width: var(--percentage, 0%);

    background: #dce4da;

    border-radius: inherit;

    z-index: -1;
}


/* Keep text above percentage bar */
#stats p span {
    margin-left: auto;

    color: #596b5c;

    font-weight: 600;

    white-space: nowrap;
}


/* =========================
   Vote count
   ========================= */

#stats h2 + p {
    display: block;

    background: none;

    min-height: auto;

    padding: 0;
}


/* =========================
   Gender line
   ========================= */

#stats h3:first-of-type + p {
    display: block;

    padding: 12px 14px;

    background: #f1f3ee;
}

#stats h3:first-of-type + p span {
    margin-left: 0;
}

/* =========================
   Voting page
   ========================= */

#VotingPage {
    width: min(900px, calc(100% - 40px));

    margin: 0 auto 60px;
}


/* =========================
   Form
   ========================= */

#Form {
    padding: 40px;

    background: #fffdf9;

    border: 1px solid #dfe3db;
    border-radius: 18px;

    box-shadow:
        0 10px 35px rgba(60, 75, 65, 0.08);
}


/* =========================
   Fieldsets
   ========================= */

#Form > fieldset {
    margin: 0;
    padding: 0;

    border: none;
}

#Form > fieldset > legend {
    width: 100%;

    margin-bottom: 25px;
    padding-bottom: 10px;

    color: #3f5145;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 2rem;
    font-weight: normal;

    border-bottom: 1px solid #dfe3db;
}


/* Nested fieldsets */

#Form fieldset fieldset {
    margin: 35px 0 0;
    padding: 25px;

    border: 1px solid #dfe3db;
    border-radius: 12px;

    background: #f7f7f2;
}

#Form fieldset fieldset legend {
    padding: 0 10px;

    color: #596b5c;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 1.35rem;
    font-weight: normal;
}


/* =========================
   Labels
   ========================= */

#Form label {
    display: flex;
    align-items: center;

    min-height: 48px;

    margin: 10px 0;

    color: #4c514b;

    font-size: 1rem;
    line-height: 1.5;
}


/* Normal text/date/number/select inputs */

#Form label input[type="email"],
#Form label input[type="text"],
#Form label input[type="date"],
#Form label input[type="time"],
#Form label input[type="number"],
#Form label select {
    margin-left: auto;

    width: 260px;

    padding: 10px 12px;

    color: #454a45;

    background: #fffdf9;

    border: 1px solid #cfd6cc;
    border-radius: 7px;

    font: inherit;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


/* Focus */

#Form input:focus,
#Form select:focus {
    border-color: #71806d;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(113, 128, 109, 0.15);
}


/* =========================
   Checkbox
   ========================= */

#Form input[type="checkbox"] {
    width: 18px;
    height: 18px;

    margin: 0 10px 0 0;

    accent-color: #596b5c;
}


/* =========================
   Submit button
   ========================= */

#Form > input[type="submit"] {
    display: block;

    width: 100%;

    margin-top: 35px;
    padding: 14px 20px;

    color: #ffffff;

    background: #596b5c;

    border: none;
    border-radius: 9px;

    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#Form > input[type="submit"]:hover {
    background: #3f5145;

    transform: translateY(-2px);

    box-shadow:
        0 6px 15px rgba(63, 81, 69, 0.2);
}

#Form > input[type="submit"]:active {
    transform: translateY(0);
}
/* =========================
   Girl / Boy choice cards
   ========================= */

#Form .choice-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}


/* Section title */

#Form .choice-group > legend {
    grid-column: 1 / -1;
}


/* The actual cards */

#Form .choice-group .choice-card {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 70px;

    margin: 0;
    padding: 15px;

    color: #596b5c;

    background: #fffdf9;

    border: 2px solid #d9ded5;
    border-radius: 10px;

    cursor: pointer;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


/* Hide radio button */

#Form .choice-group .choice-card input[type="radio"] {
    position: absolute;

    opacity: 0;

    width: 1px;
    height: 1px;

    pointer-events: none;
}


/* Text */

#Form .choice-group .choice-card span {
    font-family: Georgia, "Times New Roman", serif;

    font-size: 1.2rem;
}


/* Hover */

#Form .choice-group .choice-card:hover {
    border-color: #a8b3a1;

    background: #f4f6f1;

    transform: translateY(-2px);
}


/* Selected */

#Form .choice-group .choice-card:has(input[type="radio"]:checked) {
    border-color: #596b5c;

    background: #e7ece4;

    box-shadow:
        0 4px 12px rgba(63, 81, 69, 0.12);
}


/* Selected text */

#Form .choice-group .choice-card:has(input[type="radio"]:checked) span {
    color: #3f5145;
    font-weight: 600;
}


/* Keyboard accessibility */

#Form .choice-group .choice-card:has(input[type="radio"]:focus-visible) {
    outline: 3px solid rgba(113, 128, 109, 0.25);
    outline-offset: 2px;
}


/* Name field */

#Form .choice-group .name-input {
    grid-column: 1 / -1;
}
/* =========================
   Inputs with units
   ========================= */

#Form .input-with-unit {
    display: flex;
    align-items: center;

    width: 260px;

    margin-left: auto;

    background: #fffdf9;

    border: 1px solid #cfd6cc;
    border-radius: 7px;

    overflow: hidden;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* Actual input */

#Form .input-with-unit input {
    width: 100%;

    padding: 10px 12px;

    border: none;
    outline: none;

    background: transparent;

    font: inherit;
}


/* Unit */

#Form .input-with-unit > span {
    padding: 10px 12px;

    color: #71806d;

    background: #f1f3ee;

    border-left: 1px solid #d9ded5;

    font-weight: 600;
}


/* Focus the entire container */

#Form .input-with-unit:focus-within {
    border-color: #71806d;

    box-shadow:
        0 0 0 3px rgba(113, 128, 109, 0.15);
}
/* =========================
   Custom checkbox
   ========================= */

#Form input[type="checkbox"] {
    position: relative;

    appearance: none;
    -webkit-appearance: none;

    flex: 0 0 auto;

    width: 22px;
    height: 22px;

    margin: 0 12px 0 0;

    background: #fffdf9;

    border: 2px solid #cfd6cc;
    border-radius: 6px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

#left{
    display:flex;
    width:250px;
    position: relative;
    left:10px;
    height:100%;
}

#right{
    width:250px;
    position:relative;
    display:flex;
    right:10px;
    height:100%;
}
/* Hover */

#Form input[type="checkbox"]:hover {
    border-color: #71806d;

    background: #f4f6f1;
}


/* Checked */

#Form input[type="checkbox"]:checked {
    background: #596b5c;

    border-color: #596b5c;
}


/* Checkmark */

#Form input[type="checkbox"]:checked::after {
    content: "";

    position: absolute;

    left: 6px;
    top: 2px;

    width: 6px;
    height: 11px;

    border: solid #ffffff;
    border-width: 0 2px 2px 0;

    transform: rotate(45deg);
}


/* Keyboard focus */

#Form input[type="checkbox"]:focus-visible {
    outline: 3px solid rgba(113, 128, 109, 0.25);
    outline-offset: 2px;
}

/* =========================
   Make a guess button
   ========================= */

#MakeGuess {
    display: block;

    width: min(400px, calc(100% - 60px));

    margin: 0 auto 50px;

    padding: 15px 25px;

    color: #ffffff;

    background: #596b5c;

    border: 2px solid #596b5c;
    border-radius: 10px;

    text-align: center;
    text-decoration: none;

    font-size: 1.05rem;
    font-weight: 600;

    box-shadow:
        0 5px 15px rgba(63, 81, 69, 0.12);

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

#MakeGuess:hover {
    background: #3f5145;
    border-color: #3f5145;

    transform: translateY(-3px);

    box-shadow:
        0 8px 20px rgba(63, 81, 69, 0.2);
}

#MakeGuess:active {
    transform: translateY(0);
}
/* =========================
   Successful guess
   ========================= */

   /* =========================
   Save PDF button
   ========================= */

#savePDF,#gohome {
    display: block;
    text-align: center;
    text-decoration: none;
    width: 100%;
    margin-top: 30px;
    padding: 13px 20px;

    color: #596b5c;

    background: transparent;

    border: 2px solid #71806d;
    border-radius: 9px;

    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* Hover */

#savePDF:hover, #gohome:hover {
    color: #ffffff;

    background: #596b5c;

    border-color: #596b5c;

    transform: translateY(-2px);

    box-shadow:
        0 6px 15px rgba(63, 81, 69, 0.18);
}

header:hover{
    cursor: pointer;

}

header::before {
    content: "Klik hier om naar de startpagina te gaan";

    position: absolute;
    left: 50%;
    bottom: 30px;

    transform: translateX(-50%) translateY(10px);

    padding: 10px 20px;

    color: #ffffff;
    background: rgba(63, 81, 69, 0.85);

    border-radius: 8px;

    font-size: 1rem;

    opacity: 0;

    transition:
        opacity 0.3s ease,
        transform 0.3s ease;

    pointer-events: none;

    z-index: 2;

    white-space: nowrap;
}

header:hover::before {
    opacity: 1;

    transform: translateX(-50%) translateY(0);
}
/* Click */

#savePDF:active, #gohome:active {
    transform: translateY(0);

    box-shadow: none;
}


/* Keyboard focus */

#savePDF:focus-visible, #gohome:focus-visible {
    outline: 3px solid rgba(113, 128, 109, 0.25);
    outline-offset: 3px;
}

#VotingPage {
    width: min(900px, calc(100% - 40px));

    margin: 45px auto 60px;
    padding: 40px;

    background: #fffdf9;

    border: 1px solid #dfe3db;
    border-radius: 18px;

    box-shadow:
        0 10px 35px rgba(60, 75, 65, 0.08);
}


/* Title */

#VotingPage h2 {
    margin: 0 0 10px;

    color: #3f5145;

    font-family: Georgia, "Times New Roman", serif;

    font-size: 2.3rem;
    font-weight: normal;
}


/* Introduction */

#VotingPage > p {
    margin: 0 0 30px;

    color: #696e67;

    line-height: 1.6;
}
/* =========================
   Guess overview
   ========================= */

#VotingPage .guess-overview {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px 15px;

    margin: 0;
    padding: 0;

    list-style: none;
}


/* Individual result */

#VotingPage .guess-overview li {
    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 14px 16px;

    background: #f1f3ee;

    border: 1px solid #e0e5dd;
    border-radius: 9px;
}

#VotingPage .guess-overview li span {
    color: #71806d;

    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#VotingPage .guess-overview li strong {
    color: #3f5145;

    font-size: 1.05rem;
    font-weight: 600;
}


/* Label before the value */

#VotingPage .guess-overview li::first-line {
    color: #596b5c;
}

/* =========================
   Mobile
   ========================= */

@media (max-width: 600px) {

    header {
        height: 240px;
    }

    header h1 {
        padding: 12px 25px;

        font-size: 2.5rem;
    }

    #Banner {
        width: calc(100% - 30px);

        margin: 30px auto;

        padding: 25px 20px;

        flex-direction: column;

        gap: 20px;

        text-align: center;

        border-left: none;
        border-top: 5px solid #71806d;
    }

    #QR {
        flex-basis: auto;
    }

    #QR img {
        width: 135px;
        height: 135px;
    }

    #TEXT h6 {
        font-size: 1.7rem;
    }

    #TEXT p {
        font-size: 0.95rem;
    }

    #Main {
        width: calc(100% - 30px);

        margin-bottom: 40px;
    }

    #stats {
        padding: 25px 20px;

        border-radius: 15px;
    }

    #stats h2 {
        font-size: 1.9rem;
    }

    #stats h3 {
        margin-top: 30px;

        font-size: 1.2rem;
    }

    #stats p {
        min-height: 42px;

        padding: 9px 12px;

        font-size: 0.9rem;
    }
    #VotingPage {
        width: calc(100% - 30px);

        margin-bottom: 40px;
    }

    #Form {
        padding: 25px 20px;

        border-radius: 15px;
    }

    #Form > fieldset > legend {
        font-size: 1.8rem;
    }

    #Form fieldset fieldset {
        padding: 18px 15px;
    }

    #Form fieldset fieldset legend {
        font-size: 1.2rem;
    }

    #Form label {
        align-items: flex-start;
        flex-wrap: wrap;

        min-height: auto;

        margin: 18px 0;
    }

    #Form label input[type="email"],
    #Form label input[type="text"],
    #Form label input[type="date"],
    #Form label input[type="time"],
    #Form label input[type="number"],
    #Form label select {
        width: 100%;

        margin: 7px 0 0;
    }

    #Form label input[type="checkbox"],
    #Form label input[type="radio"] {
        flex: 0 0 auto;
    }

    #Form > input[type="submit"] {
        margin-top: 30px;
    }
    #Form .choice-group {
        grid-template-columns: 1fr 1fr;
    }

    #Form .choice-group .choice-card {
        min-height: 60px;
    }

    #Form .choice-group > label:not(:last-child) {
        min-height: 60px;
    }
    #Form .input-with-unit {
        width: 100%;

        margin: 7px 0 0;
    }
        #MakeGuess {
        width: calc(100% - 60px);

        margin-bottom: 40px;
    }

    #VotingPage {
        width: calc(100% - 30px);

        margin: 30px auto 40px;

        padding: 25px 20px;

        border-radius: 15px;
    }

    #VotingPage h2 {
        font-size: 1.9rem;
    }

    #VotingPage .guess-overview {
        grid-template-columns: 1fr;
    }
    
    #left{
        display:flex;
        width:20%;
        position: relative;
        left:10px;
        height:100%;
    }

    #right{
        width:20%;
        position:relative;
        display:flex;
        right:10px;
        height:100%;
    }
}
@media print {
    header{
        margin:0;
    }
    #Banner{
        margin:0;
    }
    body {
        background: white;
    }

    #VotingPage {
        width: 100%;
        margin: 0;
        box-shadow: none;
        border: none;
    }

    #MakeGuess,
    #sendEmail {
        display: none;
    }
    #savePDF,#gohome {
        display: none;
    }
}