/* baby-adressen: warm, zacht, een beetje speels. Geen externe fonts of scripts. */

:root {
    --cream: #fbf4ea;
    --paper: #fffdf9;
    --ink: #4b3b33;
    --muted: #8b7b6f;
    --border: #eadccc;
    --rose: #e9a5a8;
    --rose-deep: #d47f86;
    --peach: #f7cdb5;
    --sage: #b9cfb2;
    --sky: #cbdcea;
    --butter: #f8e6b0;
    --lilac: #dccde8;
    --danger: #b9494f;
    --shadow: 0 18px 40px rgba(120, 80, 60, 0.12);
    --radius: 28px;
    --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 8%, rgba(247, 205, 181, 0.55), transparent 32%),
        radial-gradient(circle at 88% 14%, rgba(203, 220, 234, 0.6), transparent 30%),
        radial-gradient(circle at 80% 90%, rgba(185, 207, 178, 0.5), transparent 34%),
        radial-gradient(circle at 10% 92%, rgba(248, 230, 176, 0.55), transparent 30%),
        var(--cream);
    display: flex;
    flex-direction: column;
}

.page {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: clamp(16px, 4vw, 48px) 16px 24px;
}

.card {
    width: 100%;
    max-width: 620px;
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(24px, 5vw, 44px);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.card.narrow { max-width: 460px; }
.card.center { text-align: center; }
body.wide .card { max-width: 1040px; }

h1 {
    font-family: var(--serif);
    font-weight: 600;
    /* Desktop: één regel (1.85rem past net in de kaart). Telefoon: twee gelijke regels. */
    font-size: 1.85rem;
    line-height: 1.2;
    margin: 0 0 12px;
    color: var(--ink);
    white-space: nowrap;
}

@media (max-width: 560px) {
    h1 {
        font-size: 1.9rem;
        white-space: normal;
        text-wrap: balance;
    }
}

.lead {
    margin: 0 0 14px;
    color: var(--ink);
}

.signature {
    margin: 28px 0 0;
    font-family: var(--serif);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--muted);
}

/* Dierenrij ------------------------------------------------------------- */

.animals {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0 0 22px;
}

.animal {
    display: inline-grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    font-size: 30px;
    line-height: 1;
    animation: bob 3.6s ease-in-out infinite;
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.05);
}

.animal.a1 { background: var(--butter); transform: rotate(-6deg); animation-delay: 0s; }
.animal.a2 { background: var(--peach); transform: rotate(4deg); animation-delay: 0.4s; }
.animal.a3 { background: var(--sky); transform: rotate(-3deg); animation-delay: 0.8s; }
.animal.a4 { background: var(--lilac); transform: rotate(5deg); animation-delay: 1.2s; }
.animal.a5 { background: var(--sage); transform: rotate(-5deg); animation-delay: 1.6s; }

.hero-animal {
    font-size: 64px;
    line-height: 1;
    margin: 0 auto 14px;
    width: 110px;
    height: 110px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--peach);
    animation: bob 3.6s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -5px; }
}

@media (prefers-reduced-motion: reduce) {
    .animal, .hero-animal { animation: none; }
}

/* Formulier ------------------------------------------------------------- */

.address-form { margin-top: 26px; }

.field { margin: 0 0 18px; }

.field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.field-label .optional {
    font-weight: 400;
    color: var(--muted);
    font-size: 0.9em;
}

.input {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 12px 14px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
    outline: none;
    border-color: var(--rose);
    box-shadow: 0 0 0 4px rgba(233, 165, 168, 0.28);
}

textarea.input { resize: vertical; min-height: 84px; }

.field-help {
    margin: 6px 0 0;
    font-size: 0.92rem;
    color: var(--muted);
}

.field-errors {
    list-style: none;
    margin: 6px 0 0;
    padding: 0;
    color: var(--danger);
    font-size: 0.95rem;
}

.has-error .input { border-color: var(--danger); }

.form-error, ul.field-errors:first-child {
    color: var(--danger);
}

.address-form > ul.field-errors {
    background: #fbe9ea;
    border-radius: 14px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

.field-grid {
    display: grid;
    gap: 0 14px;
}

.field-grid.street { grid-template-columns: minmax(0, 3fr) minmax(0, 1.2fr); }
.field-grid.city { grid-template-columns: minmax(0, 1.2fr) minmax(0, 3fr); }

/* Honeypot: buiten beeld, niet display:none (sommige bots checken dat). */
.hp-field {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Knoppen ---------------------------------------------------------------- */

.button {
    display: inline-block;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    border: 0;
    border-radius: 999px;
    padding: 13px 24px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s, background-color 0.15s;
}

.button.primary {
    width: 100%;
    background: var(--rose-deep);
    color: #fff;
    box-shadow: 0 8px 18px rgba(212, 127, 134, 0.35);
    font-size: 1.05rem;
}

.button.primary:hover { background: #c66e76; transform: translateY(-1px); }
.button.primary:active { transform: translateY(0); }

.button.secondary {
    background: var(--sage);
    color: var(--ink);
}

.button.secondary:hover { background: #a9c3a1; }

.button.danger {
    background: var(--danger);
    color: #fff;
}

.button.danger:hover { background: #a03a40; }

.card.center .button { width: auto; margin-top: 6px; }

.link-muted { color: var(--muted); }
.link-danger { color: var(--danger); font-weight: 600; text-decoration: none; }
.link-danger:hover { text-decoration: underline; }

/* Ouders ----------------------------------------------------------------- */

.login-form { margin: 18px auto 12px; max-width: 320px; }
.login-form .button { width: 100%; }

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-actions .button { width: auto; padding: 10px 18px; font-size: 0.95rem; }

.flash.success {
    background: #e8f1e4;
    border-radius: 14px;
    padding: 12px 16px;
    margin: 0 0 16px;
}

.empty { color: var(--muted); font-style: italic; }

.table-wrap { overflow-x: auto; }

table.addresses {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.97rem;
}

table.addresses th, table.addresses td {
    text-align: left;
    vertical-align: top;
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
}

table.addresses th {
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

table.addresses td.remark { color: var(--muted); max-width: 320px; }
table.addresses td.date { white-space: nowrap; color: var(--muted); }
table.addresses td.actions { text-align: right; white-space: nowrap; }

.address-preview {
    font-style: normal;
    background: var(--cream);
    border-radius: 14px;
    padding: 14px 18px;
    margin: 12px 0 16px;
    line-height: 1.5;
}

.confirm-form {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

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

.site-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
    padding: 0 20px 28px;
    max-width: 620px;
    margin: 0 auto;
}

.site-footer p { margin: 0; }

/* Mobiel ----------------------------------------------------------------- */

@media (max-width: 560px) {
    body { font-size: 16px; }
    .animal { width: 50px; height: 50px; font-size: 26px; }
    .field-grid.street, .field-grid.city { grid-template-columns: 1fr; }

}

/* Adressentabel stapelen zodra hij krap wordt (tablet/telefoon). */
@media (max-width: 760px) {
    table.addresses thead { display: none; }
    table.addresses tr {
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
    }
    table.addresses td {
        display: block;
        border: 0;
        padding: 2px 0;
        max-width: none;
    }
    table.addresses td[data-label]::before {
        content: attr(data-label) ": ";
        color: var(--muted);
        font-size: 0.8rem;
    }
    table.addresses td.actions { text-align: left; padding-top: 6px; }
    table.addresses td:empty { display: none; }
}
