/*version 20260803

changes made
20260803: added header info
20250120: header align-items: start zodat header bij hover niet naar boven schoof
20250114: error fixing, black and white to its own style
20241231: black and white theme, plus note the color scheme is assigned to the shared root and not body element, so we might reference them in other style elements
20240502: rgb colors
20240213: z-index on header and details > summary to not show the details in the header
20240216: consist use of rem and em, max function applied for nested tables
20240325: shadow removed from lists

see code\webstorm\settings.css for latest version. Update using settings\editor\(new projects) ...file and code templates
*/

/*color scheme*/

:root {
    --font-family-primary: "Syntax", "Verdana", "Nunito", sans-serif;
    --font-family-secondary: "Nunito", sans-serif;

    --green_hex: #67b173;
    --green_rgb: 103, 177, 115;
    --green-darker_hex: #589662;
    --green-darker_rgb: 88, 150, 98;
    --standoutgreen: var(--green_hex); /*in dark theme a bit brighter to be able to read letters*/

    --gray-max_hex: #cfd2e3;
    --gray-max_rgb: 207, 210, 227;
    --gray-min_hex: #e9eaf5;
    --gray-min_rgb: 233, 234, 245;
    --nav-gray_hex: #6d7080;
    --nav-gray_rgb: 109, 112, 128;
    --primarygrey: #878a99;
    --soft-black-hex: #444; /*RGB(68,68,68)*/
    --soft-black-rgb: 68, 68, 68;
    --primaryblue_hex: #3d78e3;
    --primaryblue_rgb: 61, 120, 227;

    --p-dark-blue_hex: #2d4f93;
    --p-dark-blue_rgb: 45, 79, 147;
    --p-light-blue_hex: #4172d6; /*RGB (65, 114, 214)  #4172d6*/
    --p-light-blue_rgb: 65, 114, 214;
    --p-orange_hex: #ff6212; /*RGB(255, 98, 18)*/
    --p-orange_rgb: 255, 98, 18;
    --p-light-orange_hex: #f1834a;
    --p-light-orange_rgb: 241, 131, 74;
    --p-white-soft-hex: #fff;
    --p-white-soft-rgb: 255, 255, 255;
    --p-white_hex: #f2faff;
    --p-white_rgb: 242, 250, 255;

    --font-size-header: clamp(0.6rem, 1.2rem, 1.5rem);
    --font-size-input: clamp(0.6rem, 0.8rem, 1rem);
    --font-size-images: clamp(0.4rem, 0.5rem, 0.6rem);

    /*white theme settings*/
    --main-backgroundcolor_hex: var(--p-white-soft-hex); /*RGB(255,255,255)*/
    --main_backgroundcolor_rgb: var(--p-white-soft-rgb);
    --header-background_hex: var(--gray-min_hex);
    --main-color_hex: var(--soft-black-hex);
    --main-color-rgb: var(--soft-black-rgb);
    --header-color: var(--p-dark-blue_hex);
    --footer-color: var(--p-dark-blue_hex);
    --emphasis-color: var(--p-light-blue_hex);
    --border-color: var(--gray-max_hex);
    --box-shadow: RGB(68, 68, 68, 0.15); /*RGB main-backgroundcolor*/
    --button-color_hex: var(--green_hex);
    --button-color-focus_hex: var(--green-darker_hex);
    --signal-color_hex: var(--p-light-orange_hex);
}

/*@font-face {
	font-family:  "Syntax";
	src:          url("./../fonts/Syntax.woff2") format("woff2");
	font-weight:  normal;
	font-style:   normal;
	font-display: swap;
}*/

html {
    transition:
        color 300ms,
        background-color 300ms;
    background: var(--main-backgroundcolor_hex);
    color: var(--main-color_hex);
}

/*remove any browser inserted margins and paddings*/
html,
body {
    padding: 0;
    margin: 0;
}

/*page grid --> header, main, footer*/
body {
    font-family: var(--font-family-primary);
    --heightHeader: 3em;
    --heightFooter: 4em;
    display: grid;
    grid-template-rows: var(--heightHeader) 1fr var(--heightFooter); /* Header, content, footer layout */
    grid-template-columns: 1fr; /* Single-column layout */
    min-height: 100vh; /* Full viewport height */
    margin: 0; /* Remove default browser margins */
}

/* Header at the top */
header {
    grid-row: 1;
    position: sticky; /* Sticky header */
    top: 0;
    text-align: center;
    background-color: var(--header-background_hex);
    z-index: 100;
}

/* Main content scrollable */
main {
    grid-row: 2;
    background-color: var(--main-backgroundcolor_hex, #444);
    z-index: 1;
}

/* Footer at the bottom */
footer {
    color: var(--footer-color, darkblue);
    grid-row: 3;
    position: relative; /* Relative to ensure it's part of the flow */
    text-align: center;
    background-color: var(--header-background_hex);
    height: var(--heightFooter);
    font-size: small;
    z-index: 10;
}

h1,
header {
    color: var(--header-color);
}

h2 {
    color: var(--button-color_hex);
    font-size: calc(0.9 * var(--font-size-header));
    text-decoration: underline 0.1rem;
}

h3 {
    color: var(--button-color-focus_hex);
    font-size: calc(0.8 * var(--font-size-header));
}

h4 {
    font-size: calc(0.75 * var(--font-size-header));
}

small {
    font-size: 0.8rem;
}

mark {
    color: var(--signal-color_hex);
}

code {
    display: inline-block;
    font-family: var(--font-family-primary);
    font-size: 0.85rem;
    background-color: var(--header-background_hex);
}

/*normal table*/
table {
    /*table*/
    width: 95%;
    border-collapse: collapse;
}

table thead {
    background-color: var(--header-background_hex, rgb(200, 200, 200));
}

table td,
table th {
    color: var(--main-color_hex);
    border: 0.1rem solid var(--header-background_hex, rgb(200, 200, 200));
    text-align: left;
    vertical-align: top;
}

/* LISTS */

/*nested lists*/
ol ol li {
    font-size: max(0.9em, 0.5rem);
}

/*links*/
a {
    text-decoration: none;
    color: var(--emphasis-color);
}

figcaption {
    color: var(--emphasis-color);
}

/*input*/
section.input {
    display: flex;
    flex-direction: column;
    align-items: start;
    width: max-content;
    padding: 0.1rem;
    gap: 0.2rem;
    border: 0.1rem solid var(--border-color, darkgray);
    box-shadow: 0.1rem 0.2rem 2.5rem 0 var(--box-shadow); /*3px x-as, 4px y-as, 5px blur, 0px spread*/
}

input::placeholder {
    font-size: 0.75rem;
}

header button,
button {
    position: relative;
    overflow: hidden;
    transition: background 400ms;
    color: var(--main-color_hex);
    background-color: var(--button-color_hex, lightgreen);
    font-size: var(--font-size-input);
    font-weight: bold;
    outline: 0;
    padding: 0.5rem 0.5rem;
    margin: 1rem;
    border: 0;
    border-radius: 0.25rem;
    box-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

header button {
    padding: 0;
    margin: 0;
    font-size: var(--font-size-input);
    font-weight: unset;
}

/* Hide the default arrow */
details > summary {
    list-style-type: none;
    position: relative; /*to position the pseudo elements*/
}

/* Use CSS to style our own custom arrow using the ::after pseudo-element */
details > summary::after {
    content: "...klik voor details...";
    font-size: 0.8em;
}

/* When the details element is open, we can change the arrow text */
details[open] > summary::after {
    content: "...sluit details...";
}

header nav ul {
    list-style: none;
}

/*toggle button*/
input[data-type-input="toggle"] {
    appearance: none;
    width: 2.5rem;
    height: 1.4rem;
    margin: 0;
    border-radius: 1rem;
    background: var(--nav-gray_hex);
    cursor: pointer;
    transition: background 0.2s;
}

input[data-type-input="toggle"]::before {
    content: "";
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0.2rem;
    border-radius: 50%;
    background: var(--main-color_hex);
    transition: transform 0.2s;
}

input[data-type-input="toggle"]:checked {
    background: var(--green_hex);
}

input[data-type-input="toggle"]:checked::before {
    transform: translateX(1.1rem);
}

input[data-type-input="toggle"]:focus-visible {
    outline: 0.1rem solid currentColor;
    outline-offset: 0.1rem;
}
