/* ==========================================================================
   shared.css — base layout + components (desktop & shared rules)
   Phone overrides live in mobile.css; motion lives in animations.css.

   Change log (2026-10-03):
   - Closed :root right after the variables. Every rule used to be nested
     inside :root, which old iOS Safari (<16.5) ignores entirely and which
     bumped every selector's specificity so later stylesheets couldn't
     override them.
   - Added --accent (used by base-elements.css a:hover) and --border-color
     (used by date/time inputs) — both were referenced but never defined.
   - .site_header border-bottom was "2px" with no style, so it never drew.
     Now 2px solid var(--primary).
   - Flattened the nested @media inside .avail_card.
   - Moved the two max-width media blocks (.site_main centering, small-table
     sizing) into mobile.css.
   - Removed a duplicate .gap-2.
   ========================================================================== */

:root {
    --brand-light: #FAFAFA;
    --brand-dark: #222222;
    --artifact: #6c757d;
    --primary: #1B884A;
    --secondary: #4682B4;
    --accent: #23a85c;
    /*--background: #ffffff;*/
    --surface: #f8f9fa;
    --border: #e0e0e0;
    --border-color: var(--border);
    --text: #1a1a1a;
    --error: #d32f2f;
    --success: #2e7d32;
    --warning: #ed6c02;
    --info: #0288d1;
    --white: #ffffff;

    --surface-2: #F8F9FA;
    --radius: 12px;
    --shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.footer-links a:hover {
    text-decoration: underline;
}

.brand-image {
    max-height: 5vh;
}

/*
Other experimental rules to try out later:

.content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
}

.content p {
    max-width: 70ch;
}
*/

.info_section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;

    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;

    align-items: center;
}

.standard_image_wrapper {
    width: 100%;
}

.standard_image_wrapper img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 16px;
}


.modal-container {
    display: flex;
    width: 95%;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.modal-content {
    width: 90%;
    max-height: 90%;
    border-radius: 12px;
    padding: 16px;
}

.scroll-view {
    flex: 1;
}

.title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 24px;
}

.select_horizontal {
    display: flex;
}

.helper_text {
    font-size: 0.7rem;
}

.mini_form {
    padding: 1rem;
}

.mini_form > * {
    font-size: 0.75rem;
    padding-top: 0.2rem;
}

.dashboard-section {
    background: color-mix(in srgb, var(--secondary), transparent 50%);
    border-radius: 10px;
    margin-bottom: 1.5rem;
    max-width: 100vw;
}

.filter_box {
    background: color-mix(in srgb, var(--primary), transparent 50%);
}

.section-title {
    font-size: 20px;
    font-weight: bold;
    /*margin-bottom: 16px;*/
    padding: 1rem;
    text-shadow: var(--primary);
    background-color: var(--artifact);
    border-radius: var(--radius);
    /*shadow: var(--shadow);*/
}

.input-container {
    margin-bottom: 16px;
    background-color: var(--brand-dark);
}

.label {
    font-size: 16px;
    margin-bottom: 8px;
}

.input {
    border: 1px solid #000;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
}

.text-area {
    border: 1px solid #000;
    border-radius: 8px;
    padding: 12px;
    font-size: 16px;
    height: 100px;
    text-align: left;
}

.row {
    display: flex;
    flex-direction: row;
    margin-bottom: 16px;
}

.button {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    margin: 0 4px;
}

.button-text {
    color: var(--brand-light);
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.create-button {
    padding: 0 16px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.create-button-text {
    color: var(--brand-light);
    font-weight: 600;
}

.text {
    font-size: 16px;
    line-height: 24px;
}

.text-secondary {
    font-size: 14px;
    margin-bottom: 4px;
}

/*Avail Card Test*/

.avail_title {
    font-size: 1.15rem;
    padding-left: 1rem;
    max-width: 40%;
    min-width: 40%;
}

.avail_inputs {
    justify-self: flex-end;
    margin-bottom: 1rem;
}

.avail_card {
    display: flex;
    gap: 0.75rem;
    background: var(--secondary);
    margin-bottom: 1rem;
    border-radius: var(--radius);
    width: 300px;
    max-width: 90%;
    align-content: space-between;
}

@media (min-width: 768px) {
    .avail_card {
        max-width: 300px;
    }
}

/* Layout wrapper */

.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-title {
    color: var(--primary);
    text-shadow: var(--brand-light);
    filter: drop-shadow(0 0 0.5rem);
}

/* Header */

.site_header {
    background: var(--brand-dark);
    color: var(--white);
    padding: 1rem;
}

.nav-list {
    display: none;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav-list--open {
    display: flex;
}

.nav-toggle {
    display: inline-block;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Main content */

.site_main {
    flex: 1;
    padding: 1rem;
    /*width: 90%;*/
    max-width: 1200px;
    margin-inline: auto;
    display: flex;
    min-height: 90vh;
    flex-direction: column;
    align-items: flex-start;
    /*gap: 46px;*/
}

/* Desktop */
@media (min-width: 768px) {
    .site_main {
        margin-left: 6vw;
        margin-right: 6vw;
        padding: 2rem;
        padding-top: 0;
    }

    .nav-toggle {
        display: none;
    }

    .nav-list {
        display: flex;
        flex-direction: row;
        gap: 1.5rem;
    }
}

/* Footer styles */

.site_footer {
    position: sticky; /* better than fixed for mobile in most cases */
    bottom: 0;
    background-color: var(--primary);
    color: var(--white);
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid var(--border);
    /* Support iOS safe area */
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 16px;
}

.nav-list > li {
    list-style: none;
}

.site-footer nav {
    display: flex;
    justify-content: space-around;
}

.loading-container,
.empty-container {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: center;
}

.loading-text,
.empty-text {
    font-size: 16px;
}

/* ========================
   Global Theme (Light/Dark)
======================== */

.site_header {
    max-height: 15vh;
    background-color: var(--brand-dark);
    display: flex;
    flex-direction: row;
    padding: 16px;
    gap: 8px;
    border-bottom: 2px solid var(--primary);
}

.site_banner_logo {
    max-height: 10vw;
    max-width: 10vw;
}

/* Headings, subtitles */

.heading {
    font-size: 24px;
    font-weight: bold;
    color: var(--text);
    text-align: center;
}

.subtitle {
    font-size: 18px;
    color: var(--secondary);
    text-align: center;
}

.label {
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--text);
    text-align: center;
}

.text-error {
    color: var(--error);
    font-size: 12px;
    margin-top: 4px;
}

/* Buttons */

.button-primary {
    background-color: var(--primary);
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    /*color: var(--white);*/
}

.button-secondary {
    background-color: var(--artifact);
    padding: 12px 20px;
    border-radius: 8px;
    text-align: center;
    color: var(--white);
}

.button-disabled {
    background-color: var(--surface);
    padding: 12px 20px;
    border-radius: 8px;
    opacity: 0.5;
    text-align: center;
}

/* Modal */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-body {
    width: 90%;
    max-height: 90%;
    background-color: var(--surface);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Buttons */

.button {
    appearance: none;
    border: none;
    background: var(--primary);
    color: var(--white);
    padding: .6rem .9rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.button:hover {
    filter: brightness(1.05);
}

.button:active {
    transform: translateY(1px);
}

.button[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

.button--ghost {
    border: 1px solid var(--border);
    background: transparent;
}

/* Forms */

label {
    display: block;
    font-weight: 600;
    margin-bottom: .35rem;
}

.input, input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
    width: 85%;
    padding: .6rem .7rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 12px;
}

input[type="date"],
input[type="time"],
input[type="datetime-local"] {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--white);
    color: var(--brand-dark);
    appearance: none;
    box-sizing: border-box;
}

.form-row {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 720px) {
    .form-row.grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.form-actions {
    display: flex;
    gap: .6rem;
    align-items: center;
}

/* Table */

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

.table th,
.table td {
    padding: .6rem .75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.table thead th {
    background: var(--surface-2);
    font-weight: 700;
}

.table tr:hover {
    background: color-mix(in srgb, var(--surface-2), transparent 50%);
}

/* Messages */

.messages {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    display: grid;
    gap: .5rem;
}

.message {
    padding: .75rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.message--success {
    border-color: #10b981;
    background: color-mix(in srgb, var(--success) 12%, var(--surface));
}

.message--info {
    border-color: #3b82f6;
    background: color-mix(in srgb, var(--info) 12%, var(--surface));
}

.message--warning {
    border-color: #f59e0b;
    background: color-mix(in srgb, var(--warning) 12%, var(--surface));
}

.message--error {
    border-color: #ef4444;
    background: color-mix(in srgb, var(--error) 12%, var(--surface));
}

/* Grid & utilities */

.grid {
    display: grid;
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }

    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gap-1 {
    gap: .5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wrap {
    flex-wrap: wrap;
}

.py-4 {
    padding-block: 2rem;
}

.mt-2 {
    margin-top: 1rem;
}

/* Accessibility */

.skip-link {
    position: absolute;
    left: -999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    position: static;
    width: auto;
    height: auto;
    padding: .5rem .75rem;
    background: var(--primary);
    color: var(--surface-2);
    border-radius: 10px;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 8px;
}

/* Code block */

pre {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: auto;
    background: var(--surface-2);
}

/* Page body helpers */

.par_block {
    padding: 0.5rem;
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

.main_body {
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-items: left;
    color: var(--artifact);
    font-size: 16px;
}

.par_split {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}