/* Penncrest School District - Skinned Public Form */

:root {
    --pc-navy: #1b2a4a;
    --pc-navy-light: #243658;
    --pc-blue: #3091ff;
    --pc-blue-hover: #1a7ae6;
    --pc-bg: #f5f5f5;
    --pc-white: #ffffff;
    --pc-text: #333333;
    --pc-text-light: #666666;
    --pc-border: #ddd;
    --pc-danger: #c0392b;
    --pc-success: #27ae60;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--pc-text);
    background: var(--pc-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================== HEADER ==================== */
.pc-header {
    background: var(--pc-navy);
    color: white;
}

.pc-header-top {
    background: rgba(0,0,0,0.15);
    padding: 0.4rem 0;
    font-size: 0.8rem;
}

.pc-header-top .pc-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
}

.pc-header-top a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.pc-header-top a:hover {
    color: white;
}

.pc-header-main {
    padding: 1rem 0;
}

.pc-header-main .pc-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pc-logo-mark {
    height: 55px;
    width: auto;
}

.pc-logo-name {
    height: 35px;
    width: auto;
}

.pc-header-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pc-header-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.pc-header-nav a:hover {
    background: var(--pc-navy-light);
}

.pc-header-nav a.pc-nav-active {
    background: #1565c0; /* darker than --pc-blue so white text passes WCAG AA */
}

.pc-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

/* ==================== CONTAINER ==================== */
.pc-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ==================== MAIN CONTENT ==================== */
.pc-main {
    flex: 1;
    padding: 2rem 0 3rem;
}

/* ==================== PAGE HEADER ==================== */
.pc-page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pc-page-header h1 {
    font-size: 1.75rem;
    color: var(--pc-navy);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.pc-page-header p {
    color: var(--pc-text-light);
    font-size: 1rem;
}

/* ==================== FORM CARD ==================== */
.pc-card {
    background: var(--pc-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.pc-card h2 {
    font-size: 1.2rem;
    color: var(--pc-navy);
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--pc-blue);
    font-weight: 600;
}

/* ==================== FORMS ==================== */
.pc-form-group {
    margin-bottom: 1.25rem;
}

.pc-form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.925rem;
    color: var(--pc-text);
}

.pc-form-group .required::after {
    content: ' *';
    color: var(--pc-danger);
}

.pc-form-group input[type="text"],
.pc-form-group input[type="email"],
.pc-form-group input[type="tel"],
.pc-form-group input[type="date"],
.pc-form-group input[type="time"],
.pc-form-group input[type="number"],
.pc-form-group input[type="password"],
.pc-form-group select,
.pc-form-group textarea {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--pc-border);
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--pc-white);
}

.pc-form-group input:focus,
.pc-form-group select:focus,
.pc-form-group textarea:focus {
    outline: 2px solid var(--pc-navy);
    outline-offset: 1px;
    border-color: var(--pc-navy);
    box-shadow: 0 0 0 3px rgba(48, 145, 255, 0.35);
}

.pc-form-group textarea {
    min-height: 90px;
    resize: vertical;
}

.pc-form-help {
    font-size: 0.825rem;
    color: var(--pc-text-light);
    margin-top: 0.25rem;
}

.pc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Checkbox group */
.pc-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pc-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.925rem;
}

.pc-checkbox-item input {
    width: auto;
    accent-color: var(--pc-blue);
}

/* ==================== BUTTONS ==================== */
.pc-btn {
    display: inline-block;
    padding: 0.7rem 1.75rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.pc-btn:active {
    transform: translateY(1px);
}

.pc-btn-primary {
    background: #1565c0; /* darkened from --pc-blue for WCAG AA text contrast (white on blue) */
    color: white;
}

.pc-btn-primary:hover {
    background: #104a94;
}

.pc-btn-secondary {
    background: #4a5568; /* darkened from #718096 for WCAG AA text contrast */
    color: white;
}

.pc-btn-secondary:hover {
    background: #2d3748;
}

/* ==================== ALERTS ==================== */
.pc-alert {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    font-size: 0.925rem;
}

.pc-alert-info {
    background: #e8f4fd;
    color: #1a5276;
    border: 1px solid #aed6f1;
}

.pc-alert-error {
    background: #fdedec;
    color: #78281f;
    border: 1px solid #f5b7b1;
}

.pc-alert-success {
    background: #eafaf1;
    color: #1e8449;
    border: 1px solid #a9dfbf;
}

/* ==================== FOOTER ==================== */
.pc-footer {
    background: var(--pc-navy);
    color: rgba(255,255,255,0.85);
    padding: 1.5rem 0;
}

.pc-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.pc-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pc-footer-logo {
    height: 40px;
    width: auto;
}

.pc-footer-info {
    font-size: 0.825rem;
    line-height: 1.5;
}

.pc-footer-info a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}

.pc-footer-info a:hover {
    color: white;
}

.pc-footer-right {
    font-size: 0.8rem;
    text-align: right;
    color: rgba(255,255,255,0.6);
}

.pc-footer-right a {
    color: rgba(255,255,255,0.9); /* light + underline: passes contrast on navy, not color-only */
    text-decoration: underline;
}

/* ==================== MULTI-DATE STYLES ==================== */
.date-section {
    margin-bottom: 1rem;
}

.event-dates-list {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid var(--pc-border);
    margin: 1rem 0;
}

.event-dates-list h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: var(--pc-navy);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-entry {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 0.5rem;
    padding: 0.65rem;
    background: white;
    border: 1px solid var(--pc-border);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    align-items: center;
}

.date-entry .date-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.date-entry input[type="time"] {
    width: 120px;
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--pc-border);
    border-radius: 3px;
    font-size: 0.875rem;
}

.date-entry .remove-date {
    background: var(--pc-danger);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
}

.date-entry .remove-date:hover {
    background: #a93226;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    background: var(--pc-blue);
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

/* Existing files (resubmission) */
.existing-files {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    border: 1px solid var(--pc-border);
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--pc-border);
    cursor: pointer;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item input[type="checkbox"] {
    width: auto;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: var(--pc-text-light);
    font-size: 0.825rem;
}

#multi_date_picker {
    cursor: pointer;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .pc-header-main .pc-container {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
    }

    .pc-header-nav {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    .pc-logo-name {
        height: 28px;
    }

    .pc-form-row {
        grid-template-columns: 1fr;
    }

    .pc-card {
        padding: 1.25rem;
    }

    .pc-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .pc-footer-right {
        text-align: center;
    }

    .date-entry {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .date-entry input[type="time"] {
        width: 100%;
    }
}

/* ==================== ACCESSIBILITY (WCAG 2.1 AA) ==================== */
/* Visible keyboard focus for all interactive controls (2.4.7) */
a:focus-visible,
button:focus-visible,
.pc-btn:focus-visible,
input[type="checkbox"]:focus-visible,
input[type="radio"]:focus-visible,
input[type="file"]:focus-visible {
    outline: 2px solid var(--pc-navy);
    outline-offset: 2px;
}

/* Light focus ring on the dark header/footer */
.pc-header a:focus-visible,
.pc-footer a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* Skip link — visible only when focused */
.pc-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--pc-navy);
    color: #fff;
    padding: 0.6rem 1rem;
    z-index: 1000;
    border-radius: 0 0 4px 0;
}
.pc-skip-link:focus {
    left: 0;
}

/* Grouped controls (checkbox/radio sets) use fieldset/legend but keep the form look */
.pc-fieldset {
    border: none;
    margin: 0;
    padding: 0;
    min-inline-size: auto;
}
.pc-fieldset > legend {
    display: block;
    margin-bottom: 0.4rem;
    padding: 0;
    font-weight: 500;
    font-size: 0.925rem;
    color: var(--pc-text);
}

/* ==================== PUBLIC PAGE COMPONENTS ====================
   Non-prefixed components for success / track / privacy / error / 404,
   rendered under the skinned layout. WCAG AA color choices throughout. */
:root {
    --secondary: #4a5568;
    --success: #1e7e34;
    --danger: #c0392b;
    --warning: #9a6700;
    --border: #ddd;
}

.card {
    background: var(--pc-white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.card h1 { color: var(--pc-navy); margin-top: 0; }
.card h2 { color: var(--pc-navy); font-size: 1.2rem; margin-top: 1.5rem; }
.card h3 { color: var(--pc-navy); margin-top: 1.25rem; }
.card p { margin-bottom: 0.75rem; }
.card ul { margin-left: 1.5rem; margin-bottom: 1.25rem; }
/* Content links: accessible blue + underline (not color-only). Buttons excluded. */
.card p a, .card dd a, .card li a, .alert a {
    color: #1565c0;
    text-decoration: underline;
}

/* Buttons (match the form's accessible colors) */
.btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    margin: 0.25rem 0.25rem 0.25rem 0;
}
.btn-primary { background: #1565c0; color: #fff; }
.btn-primary:hover { background: #104a94; }
.btn-secondary { background: #4a5568; color: #fff; }
.btn-secondary:hover { background: #2d3748; }

/* Alerts */
.alert { padding: 1rem 1.25rem; border-radius: 6px; margin: 1rem 0; border: 1px solid transparent; }
.alert-info { background: #e8f4fd; color: #1a5276; border-color: #aed6f1; }
.alert-error { background: #fdedec; color: #78281f; border-color: #f5b7b1; }
.alert-success { background: #eafaf1; color: #1e8449; border-color: #a9dfbf; }

/* Status badges (dark text on light fill — distinguishable by text, not color alone) */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.8rem; font-weight: 600; }
.badge-approved { background: #d4edda; color: #155724; }
.badge-denied { background: #f8d7da; color: #842029; }
.badge-pending { background: #fff3cd; color: #664d03; }

/* Submission/status confirmation block */
.tracking-status { text-align: center; }
.status-icon { font-size: 3rem; line-height: 1; margin-bottom: 0.5rem; }

/* Definition-list details (block layout — robust with nested tables) */
.event-detail { margin: 1rem 0; }
.event-detail dt { font-weight: 600; color: var(--pc-navy); margin-top: 0.75rem; }
.event-detail dd { margin: 0.1rem 0 0.4rem 0; color: var(--pc-text); }

/* Approval timeline — color + a non-color cue (✓ / bold) */
.status-timeline { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0; }
.timeline-step {
    flex: 1;
    min-width: 110px;
    text-align: center;
    padding: 0.6rem 0.5rem;
    border-radius: 4px;
    background: #eef1f5;
    color: #4a5568;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--pc-border);
}
.timeline-step.active { background: #1565c0; color: #fff; border-color: #1565c0; font-weight: 700; }
.timeline-step.complete { background: #1e7e34; color: #fff; border-color: #1e7e34; }
.timeline-step.complete::after { content: " \2713"; }
