/* XXXI Rajd o Kyrpce Macieja - design tokens per gorolskiswieto.cz */
:root {
    --green: #8BAD11;
    --green-dark: #6C930D;
    --red: #C73335;
    --cream: #F7EDDC;
    --brown: #875625;
    --text: #3d4045;
    --text-muted: #7A7A7A;
    --white: #fffdf9;
    --border: #e3d5bc;
    --radius: 10px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background: var(--cream);
}

main { flex: 1; width: 100%; }

h1, h2, h3 {
    font-family: 'Roboto Slab', serif;
    color: var(--green-dark);
    line-height: 1.25;
}

a { color: var(--green-dark); }

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: var(--green-dark);
    color: var(--white);
    border-bottom: 5px solid var(--red);
}
.site-header__link {
    display: block;
    padding: 1.25rem 0;
    color: inherit;
    text-decoration: none;
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
.site-header__logo {
    flex: none;
    width: 104px;
    height: 104px;
    padding: 5px;
    background: #fff;
    border-radius: 50%;
}
@media (max-width: 600px) {
    .site-header__logo { width: 76px; height: 76px; padding: 4px; }
}
.site-header__org {
    margin: 0;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .85;
}
.site-header__title {
    margin: .35rem 0 .25rem;
    font-family: 'Bree Serif', serif;
    font-size: clamp(1.6rem, 4.5vw, 2.4rem);
    color: var(--white);
}
.site-header__subtitle {
    margin: 0;
    font-size: .95rem;
    opacity: .9;
}

/* Footer */
.site-footer {
    margin-top: 3rem;
    padding: 1.25rem 0;
    background: var(--brown);
    color: var(--cream);
    font-size: .85rem;
    text-align: center;
}
.site-footer a { color: var(--cream); }

/* Cards / panels */
.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}
.panel h2 { margin-top: 0; }

/* Forms */
label {
    display: block;
    font-weight: 500;
    margin-bottom: .3rem;
}
.hint { font-size: .85rem; color: var(--text-muted); }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"], select {
    width: 100%;
    padding: .55rem .7rem;
    font: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
}
input:focus, select:focus {
    outline: 2px solid var(--green);
    outline-offset: 1px;
    border-color: var(--green);
}

.field { margin-bottom: 1rem; }
.field--error input, .field--error select { border-color: var(--red); }
.error {
    color: var(--red);
    font-size: .85rem;
    margin: .25rem 0 0;
}
.error-summary {
    background: #fbeaea;
    border: 1px solid var(--red);
    border-radius: var(--radius);
    padding: .9rem 1.2rem;
    margin: 1.5rem 0;
    color: var(--red);
}
.error-summary ul { margin: .3rem 0 0; padding-left: 1.2rem; }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 600px) {
    .grid-2 { grid-template-columns: 1fr; }
}

/* Saved participants list */
.saved-list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
}
.saved-list__item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .8rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--green);
    border-radius: 8px;
    background: #fdfaf3;
    margin-bottom: .4rem;
}
.saved-list__name { font-weight: 700; }
.saved-list__fee {
    margin-left: auto;
    font-weight: 700;
    color: var(--green-dark);
    white-space: nowrap;
}
.saved-list__remove {
    flex: none;
    width: 1.7rem;
    height: 1.7rem;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--red);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}
.saved-list__remove:hover { background: #fbeaea; }

/* Participant rows */
.participant {
    border: 1px solid var(--border);
    border-left: 4px solid var(--green);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fdfaf3;
}
.participant__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: .75rem;
}
.participant__title {
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    color: var(--brown);
}
.participant__fee { font-weight: 700; color: var(--green-dark); }

.checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
}
.checkbox-row input { margin-top: .3rem; }
.checkbox-row label { font-weight: 400; margin: 0; }

/* Buttons */
.btn {
    display: inline-block;
    font: inherit;
    font-weight: 700;
    padding: .65rem 1.5rem;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
}
.btn--primary { background: var(--green); color: #fff; }
.btn--primary:hover { background: var(--green-dark); }
.btn--secondary {
    background: transparent;
    color: var(--green-dark);
    border: 2px solid var(--green);
}
.btn--secondary:hover { background: var(--green); color: #fff; }
.btn--danger-link {
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: .85rem;
    padding: 0;
}
.btn--large { font-size: 1.1rem; padding: .8rem 2.2rem; }

/* Total bar */
.total-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--green-dark);
    color: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-size: 1.15rem;
}
.total-bar strong { font-size: 1.5rem; }

/* Confirmation page */
.qr-box {
    text-align: center;
    padding: 1rem;
}
.qr-box img {
    max-width: 260px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}
.payment-details {
    width: 100%;
    border-collapse: collapse;
}
.payment-details th, .payment-details td {
    text-align: left;
    padding: .45rem .6rem;
    border-bottom: 1px solid var(--border);
}
.payment-details th { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.payment-details td { font-weight: 700; }

.participant-list { margin: 0; padding-left: 1.3rem; }
.participant-list li { margin-bottom: .25rem; }

.badge {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    padding: .15rem .6rem;
    border-radius: 999px;
}
.badge--child { background: var(--cream); color: var(--brown); border: 1px solid var(--brown); }

.notice {
    background: #f3f7e3;
    border: 1px solid var(--green);
    border-radius: var(--radius);
    padding: .9rem 1.2rem;
    margin: 1rem 0;
}

/* Honeypot */
.sc-field { position: absolute; left: -9999px; opacity: 0; }

/* Tryb testowy */
.test-badge {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: .3rem 1rem;
    background: var(--red);
    color: #fff;
    font-weight: 700;
    letter-spacing: .12em;
    border-bottom-right-radius: 8px;
}
