/* =======================================================================
   --- Base Styles & Variables (for SCCMHA Forms) ---
======================================================================= */
:root {
    --bg-color: #1d1e21; /* Light grey page background */
    --surface-color: #ffffff; /* White for the form itself */
    --text-color: #212529; /* Dark text for readability */
    --primary-color: #06c4ba; /* SCCMHA Blue */
    --border-color: #adb5bd;
    --font-title: 'Oswald', sans-serif;
    --font-text: 'Poppins', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
.page-container { display: flex; flex-direction: column; min-height: 100vh; }

/* =======================================================================
   --- Form Page General Layout ---
======================================================================= */
body.sccmha-theme {
    font-family: var(--font-text);
    color: var(--text-color);
    background-color: var(--bg-color);
    background-image: url('../assets/form-back.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
.form-header {
    background-color: var(--bg-color);
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.form-logo {
    height: 60px;
    flex-shrink: 0;
}
.header-main-text { flex-grow: 1; }
.header-main-text h1 {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}
.header-main-text .header-subtitle {
    font-size: 1rem;
    color: var(--primary-color);
    margin: 0;
}
.header-home-link {
    display: flex; align-items: center; justify-content: center;
    width: 45px; height: 45px; background-color: var(--primary-color);
    color: white; border-radius: 50%; font-size: 1.4rem;
    text-decoration: none; margin-left: auto; flex-shrink: 0;
    transition: all 0.3s ease;
}
.header-home-link:hover { background-color: #004a80; transform: scale(1.1); }

.form-main { padding: 2rem 1rem; width: 100%; flex-grow: 1; }
.waiver-container {
    max-width: 1100px; /* Wider for this form */
    margin: 0 auto;
    background-color: var(--surface-color);
    padding: 2.5rem 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.form-title {
    text-align: center;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 2rem;
}
.form-section {
    margin-bottom: 1.5rem;
}

/* --- Form Fields & Grid Layout --- */
.field-group, .checkbox-area {
    margin-bottom: 1rem;
}
.field-group label, .group-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}
.field-group input[type="text"], .field-group input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-text);
}

.grid-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}
.case-holder-field {
    grid-column: 1 / -1; /* Span all columns */
}

/* --- Checkbox Groups --- */
.grid-checkboxes {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 1.5rem 0;
}
.checkbox-inline-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}
.checkbox-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
}
.checkbox-item, .checkbox-item-other {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.checkbox-item-other input[type="text"] {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 4px;
    margin-left: 5px;
    flex-grow: 1;
}
.checkbox-inline-group.horizontal {
    gap: 1rem 2rem;
}

/* --- Staff & Trainer Table --- */
.staff-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}
.staff-table th, .staff-table td {
    border: 1px solid #333;
    padding: 8px;
    text-align: center;
    vertical-align: top;
}
.staff-table thead {
    background-color: #e9ecef;
}
.staff-table th .sub-head {
    font-weight: normal;
    font-style: italic;
    font-size: 0.9rem;
}
.staff-table input[type="text"], .staff-table input[type="date"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}
.signature-pad-wrapper {
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 60px; /* Smaller height for table rows */
    background-color: #fff;
}
.signature-pad { width: 100%; height: 100%; cursor: crosshair; }
/* --- Modern Clear Button Style --- */
.clear-button {
    background-color: #e9ecef; /* Light grey background */
    color: #495057; /* Darker grey text */
    border: 1px solid #ced4da; /* Subtle border */
    border-radius: 4px;
    padding: 0.3em 0.8em;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: var(--font-text);
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.clear-button:hover {
    background-color: #dee2e6;
    border-color: #adb5bd;
    color: #212529;
}

/* --- Submit Button --- */
.submit-container {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

/* --- Responsiveness --- */
@media (max-width: 992px) {
    .grid-top, .grid-checkboxes {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 768px) {
    .form-main { padding: 1.5rem 1rem; }
    .waiver-container { padding: 1.5rem; }
    .header-content { flex-wrap: wrap; justify-content: center; }
    .header-home-link { order: -1; margin: 0 0 1rem 0; }
    .grid-top, .grid-checkboxes, .checkbox-columns {
        grid-template-columns: 1fr;
    }
}


/* =======================================================================
   --- Modern Submit Button Style ---
======================================================================= */

.btn-submit {
    display: inline-flex; /* Allows for easy icon alignment */
    align-items: center;
    gap: 0.75em;
    font-family: var(--font-title);
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    
    background: linear-gradient(145deg, #0067b3, var(--primary-color));
    border: none;
    border-radius: 8px;
    padding: 0.8em 1.8em;

    cursor: pointer;
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 90, 156, 0.2), 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease-in-out;
}

.btn-submit:hover {
    transform: translateY(-3px); /* Lifts the button */
    box-shadow: 0 7px 20px rgba(0, 90, 156, 0.25), 0 3px 6px rgba(0,0,0,0.15);
}

.btn-submit:active {
    transform: translateY(1px); /* Pushes the button down */
    box-shadow: 0 2px 5px rgba(0, 90, 156, 0.2);
}