/* Faelles udseende for de sider, deltagerne ser:
   tilmeldingsformularen, login og "min tilmelding". */

:root {
    --cream: #f6f1ea;
    --teal: #00b4b4;
    --pink: #f2b0b9;
    --yellow: #e4ae47;
    --orange: #d67a42;
    --orange-dark: #c06c3a;
    --ink: #333;
    --muted: #7c7269;
    --line: #ece5dc;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 20px;
    font-family: 'Poppins', sans-serif;
    background-color: var(--cream);
    display: flex;
    justify-content: center;
    min-height: 100vh;
    color: var(--ink);
}

.invitation-card {
    background-color: #fff;
    padding: 40px;
    border-radius: 15px;
    max-width: 640px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 2px dashed var(--teal);
    margin: auto;
}

.site-logo {
    display: block;
    width: auto;
    height: 96px;
    margin: 0 auto 22px;
}

/* Det brede logo med navn - styres paa bredden i stedet for hoejden */
.site-logo.wide {
    height: auto;
    width: 230px;
    max-width: 75%;
    margin-bottom: 26px;
}

.main-headline {
    font-family: 'Yeseva One', serif;
    font-size: 2.8rem;
    line-height: 1.1;
    margin: 0 0 30px;
    text-transform: uppercase;
}

.pink   { color: var(--pink); }
.yellow { color: var(--yellow); }
.orange { color: var(--orange); }

.info-text {
    font-size: 1rem;
    margin: 0 0 10px;
    text-transform: lowercase;
    font-weight: 400;
}

/* --- Formular --- */
.registration-section {
    margin-top: 45px;
    text-align: left;
    border-top: 1px solid var(--line);
    padding-top: 30px;
}

.form-title {
    font-size: 1.5rem;
    margin: 0 0 8px;
    color: var(--orange);
    font-weight: 600;
}

.form-intro {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 0 0 28px;
    line-height: 1.55;
}

fieldset {
    border: none;
    border-top: 1px solid var(--line);
    padding: 24px 0 0;
    margin: 0 0 24px;
}
fieldset:first-of-type { border-top: none; padding-top: 0; }

legend {
    font-weight: 700;
    font-size: 1rem;
    color: var(--orange);
    padding: 0;
    margin-bottom: 4px;
}

.hint {
    font-size: 0.82rem;
    color: var(--muted);
    margin: 0 0 14px;
    line-height: 1.5;
}

.form-group { margin-bottom: 16px; }

label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 0.88rem; }

.req { color: var(--orange); }

input[type="text"], input[type="email"], input[type="tel"],
input[type="number"], select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    background-color: #fafafa;
    color: var(--ink);
}

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

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--yellow);
    background-color: #fff;
}

/* --- Deltagerraekker --- */
.participant-row {
    display: grid;
    grid-template-columns: 1fr 92px;
    gap: 10px;
    margin-bottom: 10px;
    align-items: end;
}
.participant-row .idx {
    grid-column: 1 / -1;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: -4px;
}

/* --- Afkrydsning --- */
.check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    background: #fafafa;
    transition: border-color .15s, background-color .15s;
}
.check:hover { border-color: var(--yellow); background: #fff; }
.check input { margin: 2px 0 0; width: 18px; height: 18px; accent-color: var(--teal); flex-shrink: 0; }
.check span { font-size: 0.92rem; font-weight: 400; line-height: 1.4; }
.check.checked { border-color: var(--teal); background: #f0fbfb; }

/* --- Maaltider pr. person --- */
.person-meals-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    background: #fafafa;
}
.person-meals-card h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 700;
}
.person-meals-card .pm-band {
    font-size: 0.78rem;
    color: var(--muted);
    margin: 0 0 12px;
}
.person-meals-card .pm-day {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--teal);
    font-weight: 700;
    margin: 12px 0 6px;
}
.person-meals-card .pm-day:first-of-type { margin-top: 0; }

.pm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 6px;
}
.pm-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 400;
    margin: 0;
}
.pm-check:hover { border-color: var(--yellow); }
.pm-check.checked { border-color: var(--teal); background: #f0fbfb; }
.pm-check input {
    width: 16px; height: 16px; margin: 0;
    accent-color: var(--teal); flex-shrink: 0;
}

.day-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--teal);
    margin: 18px 0 8px;
}
.day-label:first-of-type { margin-top: 6px; }

.link-btn {
    background: none;
    border: none;
    color: var(--orange);
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

/* --- Prisoversigt --- */
.price-panel {
    background: #fffaf3;
    border: 1px solid #f0e0cb;
    border-radius: 12px;
    padding: 20px;
    margin-top: 8px;
}
.price-panel h3 {
    margin: 0 0 4px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
}
.price-package { font-weight: 700; color: var(--orange); margin: 0 0 14px; font-size: 1.05rem; }
.price-lines { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.price-lines td { padding: 5px 0; }
.price-lines td:last-child { text-align: right; white-space: nowrap; }
.price-lines .band { color: var(--muted); font-size: 0.84rem; }
.price-lines .cap td { color: var(--orange); }
.price-total td {
    border-top: 2px solid #f0e0cb;
    padding-top: 12px;
    font-weight: 700;
    font-size: 1.15rem;
}
.price-empty { color: var(--muted); font-size: 0.88rem; margin: 0; line-height: 1.5; }

details.prices { margin-top: 14px; }
details.prices summary {
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
}
details.prices table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-top: 10px; }
details.prices th, details.prices td { padding: 5px 6px; text-align: right; border-bottom: 1px solid var(--line); }
details.prices th:first-child, details.prices td:first-child { text-align: left; }
details.prices th { color: var(--muted); font-weight: 600; }

.submit-btn {
    background-color: var(--orange);
    color: #fff;
    border: none;
    padding: 16px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border-radius: 30px;
    cursor: pointer;
    width: 100%;
    margin-top: 24px;
    transition: transform .2s, background-color .2s;
}
.submit-btn:hover { background-color: var(--orange-dark); transform: translateY(-3px); }

.flash-messages { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; }
.flash-messages li { padding: 15px; margin-bottom: 10px; border-radius: 8px; font-weight: 600; font-size: 0.92rem; }
.flash-messages li.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-messages li.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* --- Besked om gengangere --- */
dialog.note-dialog {
    border: 2px dashed var(--teal);
    border-radius: 15px;
    padding: 30px;
    max-width: 400px;
    width: calc(100% - 40px);
    font-family: 'Poppins', sans-serif;
    color: var(--ink);
    background: #fff;
}
dialog.note-dialog::backdrop { background: rgba(60, 50, 40, .45); }
dialog.note-dialog h3 { margin: 0 0 12px; font-size: 1.15rem; color: var(--orange); font-weight: 600; }
dialog.note-dialog p { margin: 0 0 22px; font-size: 0.92rem; line-height: 1.6; }
dialog.note-dialog button {
    background: var(--orange); color: #fff; border: none;
    padding: 13px 26px; border-radius: 25px;
    font-family: 'Poppins', sans-serif; font-size: 0.98rem; font-weight: 600;
    cursor: pointer; width: 100%;
}
dialog.note-dialog button:hover { background: var(--orange-dark); }

/* --- Login og "min tilmelding" --- */
.page-title {
    font-family: 'Yeseva One', serif;
    font-size: 2rem;
    margin: 0 0 10px;
    color: var(--orange);
    text-align: center;
}
.page-intro {
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0 0 30px;
}

.card-list { list-style: none; padding: 0; margin: 0; text-align: left; }
.card-list li {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
    background: #fafafa;
}
.card-list a.pick {
    display: block;
    text-decoration: none;
    color: inherit;
}
.card-list li:hover { border-color: var(--teal); background: #f0fbfb; }
.card-list .no { font-weight: 700; color: var(--orange); font-size: 0.95rem; }
.card-list .who { font-size: 0.92rem; margin: 6px 0 0; line-height: 1.5; }
.card-list .meta { font-size: 0.83rem; color: var(--muted); margin: 6px 0 0; }

.foot-links {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.85rem;
}
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--orange); }
.foot-links .sep { color: var(--line); margin: 0 10px; }

.note {
    background: #f0fbfb;
    border-left: 3px solid var(--teal);
    padding: 15px 18px;
    border-radius: 0 8px 8px 0;
    font-size: 0.88rem;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 24px;
}

@media (max-width: 520px) {
    body { padding: 10px; }
    .invitation-card { padding: 22px; border-radius: 10px; }
    .main-headline { font-size: 2rem; }
    .page-title { font-size: 1.6rem; }
    .site-logo { height: 72px; margin-bottom: 16px; }
    .site-logo.wide { height: auto; width: 185px; margin-bottom: 20px; }
}
