/* ============================================================
   STYLE.CSS — Universal styling for all forms
   Mirrors philosophy of various css files for structural and appearance consistency.
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
}

body h2 {
    font-family: Arial, sans-serif;
    font-size: 1.25em;
    margin: 0;
    padding: 0;
    text-align: center;
    background: #f9f9f9;
}

/* ---------- Generic on-page header ---------- */
.page-header {
    font-family: 'Georgia', serif;        
    font-size: 1.25rem;         /* large, consistent header */
    color: #4CAF50;                          
    text-align: center;                       
    text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
    margin-top: 0;
    margin-bottom: 0.25em;        /* spacing before buttons */
}

/* ---------- Page navigation toolbar ---------- */
.page-nav {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    margin-bottom: 0.5em;
    flex-wrap: wrap;
}

.page-nav a {
    text-decoration: none;
    font-size: 0.75em;
    color: #333;
    padding: 0.3em 0.6em;
    border-radius: 5px;
    background-color: #f0f0f0;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.page-nav a:hover {
    background-color: #e0e0e0;
    transform: scale(1.05);
}

.page-nav a:active {
    transform: scale(0.95);
}

.text-link {
    display: inline-flex;          /* keep it inline but enable flex */
    align-items: center;           /* vertical centering */
    justify-content: center;       /* horizontal centering */
    text-decoration: none;
    font-size: 1.25rem;
    margin: 0 0.4em;
    color: #000;
    transition: opacity 0.2s ease;
    line-height: 1;                /* ensures vertical alignment isn’t affected by text height */
}

.text-link:hover {
    opacity: 0.7;
}

#logout-link {
    display: block;
    margin-bottom: 0.5em;
    font-size: 1.25em;
    text-decoration: none;
    color: #555;
}

.year-grid {
    border-collapse: collapse;   /* removes any table borders */
    margin: 0 auto;            /* centers table */
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.year-grid td {
    padding: 0em 0.125em;      /* compact spacing */
    border: none;               /* no borders */
}

.year-grid select {
    width: 100%;                 /* dropdown fills cell */
    padding: 0.25em;
    font-size: 1.25em;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f5f5f5;
}

.title-grid {
    border-collapse: collapse;   /* removes any table borders */
    margin: -0.5em auto;            /* centers table */
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.title-grid td {
    padding:0;      /* compact spacing */
    border: none;               /* no borders */
}

.title-grid select {
    width: 75%;                 /* dropdown fills cell */
    padding: 0.25em;
    font-size: 1.25em;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f5f5f5;
}

/* Error message */
.error {
    color: red;
    font-weight: bold;
}

/* ---------- Global font color override ---------- */
body, button, input, select, textarea, label {
    color: #000 !important; /* enforce black text on all platforms */
}

