/* Rune og Isabell's bryllup. Colours feed the Isabyte --isa-* tokens so the
   components and the hand-written parts share one palette. */
:root {
    --paper: #faf6f2;
    --surface: #ffffff;
    --ink: #33292b;
    --muted: #75686a;
    --rose: #7a5c61;
    --rose-dark: #5f464b;
    --line: #e6dcd6;
    --ok: #2f6b4a;
    --bad: #a3322b;

    --isa-color-primary: var(--rose);
    --isa-color-bg: var(--surface);
    --isa-color-text: var(--ink);
    --isa-color-border: var(--line);
    --isa-font-family: "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

h1, h2, h3, .brand, .date { font-family: Georgia, "Times New Roman", serif; font-weight: normal; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 1rem; }
h1:focus { outline: none; }
h2 { font-size: 1.35rem; margin: 2rem 0 .5rem; }
a { color: var(--rose-dark); }
.small { font-size: .875rem; color: var(--muted); margin: .25rem 0; }

.site-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem;
    padding: .9rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-size: 1.35rem; color: var(--rose-dark); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: .2rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--rose); }
.site-main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.site-footer { text-align: center; color: var(--muted); padding: 1.5rem; font-size: .9rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.75rem; }
.narrow { max-width: 560px; margin-inline: auto; }
.prose { max-width: 720px; margin-inline: auto; }
.prose img { max-width: 100%; }

.hero { text-align: center; padding: 1.5rem 0 1rem; }
.hero h1 { font-size: clamp(2.4rem, 8vw, 4rem); margin: 0; color: var(--rose-dark); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--muted); margin: 0 0 .5rem; }
.date { font-size: 1.3rem; margin: .5rem 0; }
.countdown { color: var(--muted); margin: 0; }
.invitation { text-align: center; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 2rem; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--rose); }
.tile h2 { margin: 0 0 .35rem; font-size: 1.2rem; color: var(--rose-dark); }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }

form label, .question label, .field label { display: block; font-weight: 600; margin: 1rem 0 .3rem; }
:where(.card form, .upload) input:where([type=text], [type=email], [type=number], [type=password]), input.code, textarea[readonly] {
    width: 100%; padding: .65rem .75rem; font: inherit; color: inherit;
    border: 1px solid #b9aaa5; border-radius: 6px; background: #fff;
}
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
    outline: 3px solid #c9a2a8; outline-offset: 2px;
}
input.code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; }

button.primary, .upload-button.primary, a.button {
    display: inline-block; margin-top: 1.25rem; padding: .7rem 1.4rem; font: inherit; font-weight: 600; cursor: pointer;
    color: #fff; background: var(--rose); border: 0; border-radius: 6px; text-decoration: none;
}
button.primary:hover, .upload-button.primary:hover, a.button:hover { background: var(--rose-dark); }
button.plain { font: inherit; padding: .45rem .9rem; border: 1px solid #b9aaa5; border-radius: 6px; background: #fff; cursor: pointer; }

.notice { padding: .7rem .9rem; border-radius: 6px; background: #f3ebe6; border: 1px solid var(--line); }
.notice.error { background: #fbeceb; border-color: #e5b9b5; color: var(--bad); }
.notice.success { background: #e9f4ee; border-color: #b9d8c6; color: var(--ok); }
.notice.warning { background: #fff5dc; border-color: #ecd596; color: #6b5200; }

.question { margin-bottom: 1.25rem; }

.upload-button input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-button:focus-within { outline: 3px solid #c9a2a8; outline-offset: 2px; }
.upload-summary { font-weight: 600; min-height: 1.6em; }
.upload-list { list-style: none; margin: 0; padding: 0; }
.upload-list li { display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; padding: .5rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.upload-list .upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-list progress { grid-column: 1 / -1; width: 100%; height: .5rem; accent-color: var(--rose); }
.upload-list li.ok .upload-status { color: var(--ok); }
.upload-list li.failed .upload-status { color: var(--bad); }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: 1.5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.admin-nav a { text-decoration: none; color: var(--ink); border-bottom: 2px solid transparent; }
.admin-nav a.active, .admin-nav a:hover { border-bottom-color: var(--rose); }
.row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; }
.row > * { flex: 1 1 180px; }
.row > .fit { flex: 0 0 auto; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 1rem 0 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem; }
.stat .value { font-size: 1.7rem; font-family: Georgia, serif; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
table.data { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: #f6efea; font-weight: 600; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .8rem; background: #efe6e1; }
.tag.ok { background: #e2f1e8; color: var(--ok); }
.tag.bad { background: #fbe6e4; color: var(--bad); }
.tag.wait { background: #fff1cf; color: #6b5200; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: .5rem 0 1rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* QR poster */
.poster { text-align: center; background: #fff; padding: 2rem 1rem; }
.poster h1 { font-size: 2.6rem; color: var(--rose-dark); margin-bottom: .25rem; }
.poster .qr svg { width: min(70vw, 105mm); height: auto; }
.poster .lead { font-size: 1.3rem; margin: .5rem 0 1.5rem; }
.poster .url { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }

#blazor-error-ui { display: none; position: fixed; inset: auto 0 0 0; padding: .7rem 1.25rem; background: #fff5dc; border-top: 1px solid #ecd596; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

@media print {
    .no-print { display: none !important; }
    html, body { background: #fff; }
    .site-main { padding: 0; max-width: none; }
    .poster { padding: 18mm 10mm 0; }
    .poster h1 { font-size: 34pt; }
    .poster .qr svg { width: 120mm; }
    .poster .lead { font-size: 18pt; }
    @page { size: A4 portrait; margin: 12mm; }
}

/* Front page, after the couple's planning.wedding site: white, airy, thin headings. */
:root { --rose: #814646; --rose-dark: #5e3232; --paper: #ffffff; --isa-color-primary: #814646; }
html, body { font-weight: 300; }
h1, h2, h3, .brand, .date { font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif; font-weight: 200; }
strong, b { font-weight: 600; }
.site-header { border-bottom: 0; }
.brand { font-weight: 400; letter-spacing: .02em; }
.site-nav { align-items: center; }
.site-nav a { font-size: .9rem; color: var(--rose); }
.site-nav a.rsvp-link, .outline-button {
    display: inline-block; padding: .45rem 1.1rem; border: 1px solid var(--rose); border-radius: 2px;
    color: var(--rose); text-decoration: none; font-size: .85rem; letter-spacing: .05em; background: transparent;
}
.site-nav a.rsvp-link:hover, .outline-button:hover { background: var(--rose); color: #fff; border-bottom-color: var(--rose); }
.site-main:has(.hero) { max-width: none; padding: 0 0 3rem; }
.hero {
    text-align: center; padding: clamp(3rem, 12vw, 8rem) 1.25rem; margin: 0;
    background: linear-gradient(160deg, #f1ebee 0%, #e4dbe2 55%, #d6d1d7 100%); background-size: cover; background-position: center;
}
.hero.with-photo { min-height: min(70vh, 620px); display: grid; align-items: center; }
.hero.with-photo .hero-text { background: rgba(255, 255, 255, .78); padding: 1.5rem 2rem; justify-self: center; border-radius: 2px; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 4.5rem); color: var(--ink); margin: .25rem 0 0; font-weight: 200; }
.hero-date { font-size: 1.5rem; margin: 0; }
.hero-lead { font-size: 1.15rem; margin: .4rem 0 0; color: var(--muted); }
.band { max-width: 1000px; margin: 0 auto; padding: 3rem 1.25rem 1rem; scroll-margin-top: 1rem; }
.section-title { font-size: 1.5rem; font-weight: 600; margin: 0 0 1.5rem; }
.band .prose { margin-inline: 0; max-width: 760px; }
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.event { text-align: center; padding: 2rem 1rem; border: 1px solid var(--line); border-radius: 2px; }
.event h3 { font-size: 2rem; margin: 0 0 1rem; }
.event-date, .event-time { font-size: 1.35rem; margin: 0; }
.event-address { color: var(--muted); font-size: .9rem; margin: .75rem 0; }
.event-links { display: flex; flex-direction: column; gap: .15rem; font-size: .9rem; margin: 0 0 1rem; }
.event-links a { color: var(--rose); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; align-items: center; }
.palette { display: flex; gap: .75rem; justify-content: center; }
.palette span { width: 4.2rem; height: 4.2rem; border-radius: 50%; }
.countdown-band { text-align: center; padding: 3rem 1.25rem 1rem; }
.countdown-band .countdown { font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 200; color: var(--ink); margin: 0 0 .5rem; }
fieldset.person { border: 1px solid var(--line); border-radius: 6px; padding: .5rem 1rem 1rem; margin: 0 0 1.25rem; }
fieldset.person legend { font-weight: 600; padding: 0 .4rem; }
.admin-login { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
details { margin: 1rem 0; }
details summary { cursor: pointer; color: var(--rose); }

/* Table planner. Lengths inside the SVG are millimetres. */
.plan { max-width: 780px; margin: 0 auto; }
.plan-svg { width: 100%; height: auto; touch-action: none; user-select: none; background: #f4f1ee; border: 1px solid var(--line); border-radius: 4px; }
.plan-floor { fill: #fffdf9; }
.plan-grid line { stroke: #e3dcd5; stroke-width: 12; }
.plan-wall { fill: none; stroke: #4a4244; stroke-width: 90; stroke-linejoin: miter; }
.plan-door { stroke: #fffdf9; stroke-width: 110; }
.plan-fixed { fill: #b08a66; stroke: #6d5138; stroke-width: 25; }
.plan-fixed-label, .plan-table-label { font: 600 260px "Helvetica Neue", Arial, sans-serif; fill: #2a2224; pointer-events: none; }
.plan-fixed-label { fill: #fff; }
.plan-note { font: 400 200px "Helvetica Neue", Arial, sans-serif; fill: #6a5d60; dominant-baseline: middle; }
.plan-scale { stroke: #4a4244; stroke-width: 40; }
.plan-table { cursor: grab; outline: none; }
.plan-table rect { fill: #e9e4ea; stroke: #6f6470; stroke-width: 25; }
.plan-table.parked rect { fill: #f3f0f4; stroke-dasharray: 90 60; }
.plan-table.bad rect { fill: #f6c9c5; stroke: #a3322b; stroke-width: 45; }
.plan-table.selected rect, .plan-table:focus-visible rect { stroke: #814646; stroke-width: 70; }
.plan-table:active { cursor: grabbing; }
.plan-status { min-height: 1.6em; font-weight: 600; }
.plan-status.warn { color: var(--bad); }
@media print { .plan { max-width: none; } .plan-svg { border: 0; background: #fff; max-height: 250mm; } }
.plan-table.fixed { cursor: default; }
