/* gplanr: base styles (desktop first). No @media rules in this file:
   main_tablet.css (tablets and smaller) and main_gsm.css (phones) hold all of those and are loaded after this one. */

:root {
    --page: #1e2b58;
    --panel: #f3f2f7;
    --navy: #2f4495;
    --navy-hover: #263a82;
    --line: #c5c8cc;
    --focus: #8fb2ff;
    --text-dark: #222;
    --text-muted: #444;
    --text-faint: #555;
    --error: #b3261e;
    --error-on-dark: #ffb4b4;
    --ok: #1b6e3c;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--page);
    color: #fff;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

img { max-width: 100%; }

[hidden] { display: none !important; }

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

#main-content { min-height: 100vh; min-height: 100dvh; }

/* Every page's content sits in .divbody, centred on the screen. */
.divbody {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
}

.text-emphasis { color: #fff; font-weight: 700; }

/* ── Cards, forms and buttons (tenant pages) ───────────────────────────── */
.brand { width: min(420px, 80vw); height: auto; }
.brand-small { width: min(320px, 70vw); height: auto; }
.page-title { margin: 0; font-size: 1.8rem; font-weight: 600; text-align: center; }
.org-image { max-width: min(420px, 80vw); height: auto; border-radius: 8px; }

.card { width: min(380px, 100%); background: var(--panel); color: var(--text-dark); border-radius: 10px; padding: 1.5rem; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.card h1, .card h2 { margin: 0 0 1rem; font-size: 1.2rem; color: var(--navy); }
.card p { margin: 0 0 .5rem; font-size: .9rem; color: var(--text-muted); }
.card label { display: block; margin: .8rem 0 .3rem; font-size: .85rem; font-weight: 600; }
.card input { width: 100%; height: 2.75rem; padding: 0 .9rem; background: #fff; color: var(--text-dark); border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.card input:focus-visible, .btn:focus-visible, .link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.btn {
    display: block; width: 100%; height: 2.75rem; margin-top: 1.2rem;
    background: var(--navy); color: #fff; border: 0; border-radius: 6px;
    font: inherit; font-weight: 700; text-transform: uppercase; text-align: center; line-height: 2.75rem;
    text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--navy-hover); }
.btn:disabled { opacity: .6; cursor: progress; }

.link { display: block; width: 100%; margin-top: .6rem; text-align: center; font: inherit; font-size: .9rem; color: var(--navy); cursor: pointer; background: none; border: 0; }
.link:hover { text-decoration: underline; }

/* A message only takes room when there is one, so the card grows on an error. */
.msg { margin: .8rem 0 0; font-size: .9rem; color: var(--error); }
.msg:empty { display: none; }
.ok { color: var(--ok); }
.help { margin: 0 0 .5rem; font-size: .9rem; color: var(--text-muted); }
.who { margin: 0 0 .3rem; font-size: 1.05rem; }
.level { margin: 0; color: var(--text-faint); font-size: .9rem; }

/* ── Landing page (bare gplanr.be) ─────────────────────────────────────── */
.page-landing .divbody { gap: 0; padding: 0; }

/* The picture already contains a painted sign-up box. The real form sits exactly on top of it
   (positions are percentages of the 1664 x 624 picture) and is opaque, so it covers the painted one. */
.stage { position: relative; width: 100%; max-width: 1664px; margin: 0 auto; container-type: inline-size; }
.stage img { display: block; width: 100%; height: auto; }

.signup { position: absolute; left: 56.1%; top: 91.27%; width: 32.93%; height: 6.49%; display: flex; gap: 1.64%; margin: 0; }
.signup input[type=email] {
    flex: 0 0 72.54%; min-width: 0; height: 100%; padding: 0 3.5%; background: #fff; color: var(--text-dark);
    border: 1px solid var(--line); border-radius: .5cqw; font: inherit; font-size: clamp(11px, .96cqw, 17px);
    box-shadow: 0 0 0 .25cqw var(--panel);
}
.signup input::placeholder { color: #767676; }
.signup button {
    flex: 1; min-width: 0; height: 100%; background: var(--navy); color: #fff; border: 0; border-radius: .5cqw;
    font: inherit; font-weight: 700; font-size: clamp(10px, .9cqw, 16px); text-transform: uppercase; cursor: pointer;
    box-shadow: 0 0 0 .25cqw var(--panel);
}
.signup button:hover { background: var(--navy-hover); }
.signup button:disabled { opacity: .6; cursor: progress; }
.signup input:focus-visible, .signup button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* On wide screens the messages hang below the picture without moving it, so the picture stays centred. */
.status { position: absolute; top: 100%; left: 0; right: 0; margin: .8rem 1rem 0; min-height: 1.6em; text-align: center; font-size: 1rem; }
.status.error { color: var(--error-on-dark); }
.privacy { position: absolute; top: 100%; left: 0; right: 0; margin: 4.2rem 1rem 0; text-align: center; font-size: .8rem; opacity: .7; }
.privacy2 { position: absolute; top: 100%; left: 0; right: 0; margin: 3.2rem 1rem 0; text-align: center; font-size: .8rem; opacity: .7; }

/* ── Footer and "about" box (include/footer.php) ───────────────────────── */
.footer {
    display: flex; align-items: center; gap: 5px;
    position: fixed; left: 5px; bottom: 5px; z-index: 1000;
    width: 150px; padding: 5px;
    background: var(--page); color: #c9cfe6; border: 1px solid var(--navy); border-radius: 6px;
    cursor: pointer;
}
.footer-logo { line-height: 1; }
.footer-logo img { display: block; width: 50px; height: auto; }
.footer-version { margin-left: 5px; font-family: Arial, sans-serif; font-size: 11px; }
.footer-version .text-emphasis { margin-left: 5px; }

#ct_about {
    display: none;
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 20000;
    width: 404px; max-width: calc(100vw - 20px); max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px); overflow-y: auto;
    background: var(--page); color: #fff; border: 1px solid var(--navy); border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
}
#ct_about.visible { display: block; }
.ct_about_header { position: relative; padding: 15px 0 10px; text-align: center; }
.ct_about_header img { display: block; width: 90%; max-width: 100%; height: auto; margin: 0 auto; }
#closeAbout { position: absolute; right: 8px; top: 0; font-size: 30px; line-height: 1.2; cursor: pointer; }
#gotoGiTaC { display: flex; align-items: center; gap: 12px; width: 100%; padding: 5px 10px 5px 20px; background: var(--navy); color: #fff; border-radius: 0 0 10px 10px; cursor: pointer; }
#meerinfo { flex: 1; }
#gotoGiTaC img { width: 38%; height: auto; }
