﻿html {
    font-size: 12px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Modern font */
    background-color: #f8f9fa; /* Light grey background for the entire page */
    color: #333; /* Dark text for readability */
    margin: 0px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 13px;
}

main {
    flex: 1; /* Fills remaining space */
}

input.input-validation-error,
select.input-validation-error,
textarea.input-validation-error {
    border-color: #dc3545; /* Bootstrap danger/red color */
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25); /* subtle red glow */
}

/* Style for the table with id 'summary' */
#educatorTable {
    width: 100%; /* Full width */
    table-layout: auto; /* Let columns size naturally */
    border-collapse: collapse; /* Better border styling */
}

#educatorResults table {
    font-size: 0.80rem;
}

/* Header styling */
#educatorTable thead th {
    background-color: #31587D; /*  blue background */
    color: white; /* White text */
    padding: 10px; /* Some padding */
    text-align: left; /* Align text left */
    border: 1px solid #ddd; /* Border for header cells */
}

/* Body cells styling */
#educatorTable tbody td {
    padding: 8px;
    border: 1px solid #ddd;
    vertical-align: middle;
    word-wrap: break-word; /* Wrap long content */
}

/* Optional: zebra striping */
#educatorTable tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

#HQButtons {
    display: none;
}

#schoolButtons {
    display: none;
}

/* Container */
.search-container {
    border: 1px solid #dee2e6;
    border-radius: 20px; /* Rounded pill-like corners */
    padding:  10px 10px 10px 20px;
    background-color: #f8f9fa; /* Clean white background */
    max-width: 1000px;
    margin: 30px auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05); /* Subtle shadow */
    transition: all 0.3s ease;
}

/* Small screens (phones) */
@media (max-width: 576px) {
    .search-container {
        margin: 10px auto /* reduce outer spacing */
    }
}

/* Search Type Heading */
.search-container fieldset legend {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding: 5px;
    color: #333;

}

/* Form Labels */
.form-label {
    font-weight: 500;
    color: #495057;
}

/* Form Sections */
.form-section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.form-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Input & Select Styling */
.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid #ced4da;
    padding: 8px 12px;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #007bff; /* Primary blue focus */
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Validation Feedback */
.invalid-feedback,
.text-danger {
    font-size: 0.875rem;
    margin-top: 4px;
    display: block;
}

/* Radio Buttons */
.form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

.form-check-label {
    font-weight: 500;
}

/* Style for 'Select All' button */
.btn-select-all {
    color: #02409D;
    background-color: #F8F9FA;
    border-color: #084298;
}

/* Style for 'Reset' button */
.btn-reset {
    color: #4C5257;
    background-color: #F8F9FA;
    border-color: #343a40;
}


/* Custom Navbar Background */
.navbar {
    background-color: white !important; /* Ensure it overrides existing styles */
    border-radius: 10px 10px 10px 10px; /* Round the bottom corners */
}


.header-nav {
    background-color: #cadae4 !important;
    border-radius: 10px;
    min-height: 40px; /* ✅ allow it to grow */
    padding: 8px 8px; /* ✅ add internal spacing */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #ccc;
    width: 100%;
}

/* Style for the legend */
legend {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Modern font */
    font-size: 1.25rem; /* Adjust size */
    font-weight: 600; /* Slightly bolder */
    margin-bottom: 10px; /* Space below the legend */
    padding-bottom: 5px; /* Padding to give space above the line */
    border-bottom: 1px solid gray; /* Adds a blue line under the text */
}

/* Reduce the size of the radio button */
.form-check-input {
    opacity: 0; /* Keep it hidden */
    position: absolute; /* Remove from document flow */
    width: 16px; /* Smaller width */
    height: 16px; /* Smaller height */
    transform: scale(0.3); /* Scale down the radio button */
    transition: transform 0.2s ease-in-out; /* Smooth transition */
}

/* Style the label to look like a button */
.form-check-label {
    display: inline-block;
    padding: 3px 8px; /* Add padding to make it look like a button */
    margin: 0px; /* Add some space between the buttons */
    background-color: lightblue ; /* Blue background */
    color: black; /* White text color */
    border-radius: 25px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s, transform 0.2s ease-in-out; /* Smooth transitions */
    min-width: 150px;
    height:30px;
    text-align: center;
    font-size: 15px !important;
}

/* On hover */
.form-check-label:hover {
    background-color: #2980b9; /* Darker blue on hover */
    transform: scale(1.05); /* Slight zoom effect */
}

/* On checked (active) state */
.form-check-input:checked + .form-check-label {
    background-color: #96C8D7;
    color: black;
    font-weight: bold;
    border: 2px solid black; /* Border color changes on active */
    transform: scale(1.05); /* Maintain the zoom effect */
}

/* Focus style for accessibility */
.form-check-input:focus + .form-check-label {
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25); /* Focus ring */
}

/* Override Bootstrap's default text-danger color */
.text-danger {
    color: #d32f2f !important; /* Darker, more accessible red */
    font-weight: bold
}

/* Primary Button */
.btn-primary {
    background-color: #0056B3; /* Primary blue */
    color: white; /* Text color */
    border: none; /* Remove default border */
    padding: 10px 20px; /* Adjust padding */
    font-size: 16px; /* Font size */
    font-weight: 600; /* Bold text */
    border-radius: 30px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3); /* Subtle shadow */
    cursor: pointer; /* Pointer cursor on hover */
    transition: all 0.3s ease; /* Smooth transition */
}

/* Accessibility: Add focus state for keyboard navigation */
.btn-primary:focus {
    outline: 3px solid #ffbf47; /* Visible focus ring */
    outline-offset: 2px; /* Offset the outline slightly */
}

/* Hover and Active States */
.btn-primary:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: translateY(-2px); /* Slight lift on hover */
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.4); /* More shadow on hover */
}

.btn-primary:active {
    background-color: #004085; /* Even darker blue on active */
    transform: translateY(1px); /* Button presses down when clicked */
}

/* Secondary Button */
.btn-secondary {
    background-color: #6c757d; /* Secondary gray */
    color: white; /* Text color */
    border: none; /* Remove default border */
    padding: 10px 20px; /* Adjust padding */
    font-size: 16px; /* Font size */
    font-weight: 600; /* Bold text */
    border-radius: 30px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3); /* Subtle shadow */
    cursor: pointer; /* Pointer cursor on hover */
    transition: all 0.3s ease; /* Smooth transition */
}

/* Accessibility: Add focus state for keyboard navigation */
.btn-secondary:focus {
    outline: 3px solid #ffbf47; /* Visible focus ring */
    outline-offset: 2px; /* Offset the outline slightly */
}

/* Hover and Active States */
.btn-secondary:hover {
    background-color: #5a6268; /* Darker gray on hover */
    transform: translateY(-2px); /* Lift on hover */
    box-shadow: 0 8px 16px rgba(108, 117, 125, 0.4); /* More shadow on hover */
}

.btn-secondary:active {
    background-color: #343a40; /* Darker gray on active */
    transform: translateY(1px); /* Button presses down when clicked */
}



/* Only the status cell should be red when expired */
/* Expired status */
.expired-status {
    color: #940000 !important; /* dark red */
    white-space: nowrap;
}

/* Suspended status */
.suspended-status {
    color: #ff9900 !important; /* orange/yellow for caution */
    white-space: nowrap;
}

/* Revoked status */
.revoked-status {
    color: #d32f2f !important; /* bright red for danger */
    white-space: nowrap;
}

/* Surrendered status */
.surrendered-status {
    color: #6c757d !important; /* gray/neutral */
    white-space: nowrap;
}

/* Subtle loading state on table during page turns */
.table-loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* Expired status icon colour */
.expire-icon {
    color: #940000;
}

/* The status cell should be green when issued */
.issued-status {
    color: green !important; /* red text */
    white-space: nowrap;
}

/* Modern, accessible text-style button */
.btn-modern {
    color: #000000; /* High contrast text */
    background-color: transparent; /* No box */
    text-decoration: none; /* Remove underline */
    font-weight: 600;
    padding: 4px 10px; /* Optional spacing for clickable area */
    display: inline-block;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    font-size: 0.85rem;
    line-height: 1.2;
}

/* Hover and focus states */
.btn-modern:hover,
.btn-modern:focus {
    color: #005fcc; /* Change color on hover/focus */
    text-decoration: underline; /* Optional underline for visual feedback */
    cursor: pointer;
}

/* Search input */
.dataTables_filter input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 12px;
    outline: none;
    min-width: 280px;
    font-size: 14px;
}

.dataTables_filter input::placeholder {
    font-size: 14px; /* Set placeholder text size */
    color: #888888; /* Optional: lighter color for placeholder */
    font-style: italic; /* Optional: make it italic for style */
}

.dataTables_filter input:focus {
    border-color: #3b82f6;
}

/* Length dropdown */
.dataTables_length select {
    border-radius: 8px;
    padding: 4px 8px;
}

/* Table */
table.dataTable {
    border-collapse: separate;
    border-spacing: 0 6px;
    border-radius: 8px !important;
}

table.dataTable tbody tr {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

table.dataTable tbody td {
    border-top: none;
}

table.dataTable tbody tr {
    border-radius: 8px !important;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

table.dataTable tbody tr:hover {
    background-color: #f9fafb;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transform: translateY(-1px);
}


/* Pagination */
.dataTables_paginate .paginate_button {
    border-radius: 6px;
    padding: 4px 4px;
    margin: 0 2px;
    border: none !important;
}

.dataTables_paginate .paginate_button.current {
    background: #3b82f6 !important;
    color: #fff !important;
}

/* Make "Show entries" dropdown smaller */
.dataTables_length select {
    min-width: 60px;
}


/* Full-page overlay — hidden by default */
.spinner-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.7);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Add this class to show the overlay correctly centred */
.spinner-overlay.spinner-visible {
  display: flex;
}

/* Parent spinner for pulsing */
.spinner {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s ease-in-out infinite;
}

/* Child spinner for rotation */
.spinner-rotate {
  width: 100%;
  height: 100%;
  border: 6px solid rgba(0, 123, 255, 0.2);
  border-top-color: #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Spin rotation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Pulse scaling */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

/* Loading text animation */
.loading-text {
  margin-top: 0.75rem;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  color: #007bff;
  animation: fade 1.5s infinite;
}

@keyframes fade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.3; }
}



/* Ensure controls fit inside small screens */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

.dataTables_wrapper .dataTables_filter input {
    flex: 1 1 auto;
    min-width: 120px;
}

/* Align the filter container to the right */
.dataTables_wrapper .dataTables_filter {
    justify-content: flex-end; /* push filter to the right */
}

/* Default logo (for medium/large screens) */
.logo-img {
    height: 70px;
}

/* Small screens */
@media (max-width: 768px) {
    .logo-img {
        height: 50px; /* adjust size */
    }
}

.d-flex.justify-content-between {
    flex-wrap: wrap; /* allow wrapping on small screens */
    gap: 0.5rem; /* spacing between items */
}

.item-start {
    flex: 1 1 100%; /* take full width on small screens */
    order: 1; /* show first */
}

.item-end {
    flex: 1 1 auto; /* take minimal space for buttons */
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    order: 2;
}

@media (max-width: 576px) {
    .item-end {
        justify-content: flex-start; /* buttons stack naturally */
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

/* === Inline-style replacements (CSP compliance) === */

/* _Header: spinnerOverlay hidden by default */
.spinner-overlay {
    display: none;
}

/* _Header: Bootstrap spinner size override */
.spinner-border-lg {
    width: 3rem;
    height: 3rem;
}

/* Index: district select max-width */
.district-select-wrapper {
    max-width: 400px;
}

/* Index: certificate input max-width */
.cert-input-wrapper {
    max-width: 250px;
}

/* Index: Search button right margin */
.btn-search {
    margin-right: 10px;
}

/* Index / _EducatorSummaryPartial: hidden panels */
.d-none-init {
    display: none;
}

/* _EducatorSummaryPartial: status icon inline layout */
.status-cell-inner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* _EducatorSummaryPartial: small font for certificate type */
.font-size-sm {
    font-size: 12px;
}

/* _EducatorSummaryPartial: expire date centered (asterisk rows) */
.text-center-cell {
    text-align: center;
}

/* _EducatorSummaryPartial: expire date left-aligned */
.text-left-cell {
    text-align: left;
}

/* _EducatorSummaryPartial: footnote for asterisk expire date */
.expire-footnote {
    color: #940000;
    font-weight: bold;
}

/* Honeypot field — moved off-screen so humans never see it, but bots fill it */
.hp-field {
    position: absolute;
    left: -9999px;
    top: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    tab-index: -1;
}

/* Statewide download gate form */
.download-gate-container {
    max-width: 620px;
    margin: 40px auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.07);
}

/* ── Gate page wrapper ──────────────────────────── */
.gate-wrapper {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    background: linear-gradient(135deg, #eef4fb 0%, #f8f9fa 100%);
}

.gate-card {
    width: 100%;
    max-width: 680px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 86, 179, 0.10);
    overflow: hidden;
}

/* ── Header band ────────────────────────────────── */
.gate-header {
    background: linear-gradient(135deg, #0056b3 0%, #1a73c8 100%);
    color: #fff;
    padding: 36px 40px 28px;
    text-align: center;
}

.gate-icon-wrap {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
}

.gate-title {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0 0 8px;
}

.gate-subtitle {
    font-size: 0.9rem;
    opacity: 0.88;
    margin: 0;
    line-height: 1.5;
}

/* ── Form body ──────────────────────────────────── */
.gate-form {
    padding: 32px 40px 36px;
}

.gate-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 576px) {
    .gate-row { grid-template-columns: 1fr; }
    .gate-form { padding: 24px 20px 28px; }
    .gate-header { padding: 28px 20px 22px; }
}

.gate-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.gate-row .gate-field {
    margin-bottom: 0;
}

.gate-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.gate-required {
    color: #dc3545;
    margin-left: 2px;
}

.gate-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #111827;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.gate-input:focus {
    border-color: #0056b3;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.12);
}

.gate-textarea {
    resize: vertical;
    min-height: 88px;
}

.gate-error {
    font-size: 0.8rem;
    color: #dc3545;
    font-weight: 500;
    margin-top: 4px;
    min-height: 18px;
}

/* ── Acknowledgement card ───────────────────────── */
.gate-ack-card {
    background: #f0f6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 28px;
}

.gate-ack-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.gate-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #0056b3;
    cursor: pointer;
}

.gate-ack-text {
    font-size: 0.875rem;
    color: #1e3a5f;
    line-height: 1.55;
}

/* ── Action buttons ─────────────────────────────── */
.gate-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.gate-btn-submit {
    padding: 11px 28px;
    background: #0056b3;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px rgba(0,86,179,0.25);
}

.gate-btn-submit:hover {
    background: #004494;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,86,179,0.3);
}

.gate-btn-submit:active { transform: translateY(0); }

.gate-btn-cancel {
    padding: 11px 22px;
    color: #6b7280;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    border: 1.5px solid #d1d5db;
    transition: background 0.2s, color 0.2s;
}

.gate-btn-cancel:hover {
    background: #f3f4f6;
    color: #374151;
}

/* _Footer: footer padding */
.footer-inner {
    padding: 0 30px;
}

/* _Footer: support link colour */
.footer-link {
    color: #0345A0;
}

/* ── StateDownloadLanding visibility helpers ───── */
.download-ready-hidden {
    display: none !important;
}

.download-success-hidden {
    display: none !important;
}

.gate-header-success {
    background: linear-gradient(135deg, #198754 0%, #28a745 100%);
}

.gate-btn-link {
    display: inline-block;
    text-decoration: none;
}

/* ── ReviewRequest page ─────────────────────────── */
.review-detail-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.review-detail-row {
    display: flex;
    align-items: flex-start;
    padding: 12px 20px;
    border-bottom: 1px solid #e2e8f0;
    gap: 16px;
}

.review-detail-row:last-child { border-bottom: none; }

.review-label {
    flex-shrink: 0;
    width: 140px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-top: 1px;
}

.review-value {
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.5;
    flex: 1;
    word-break: break-word;
}

.review-value-mono {
    font-family: monospace;
    font-size: 0.88rem;
    color: #475569;
}

.review-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.review-btn-approve {
    flex: 1;
    padding: 12px 24px;
    background: #198754;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(25,135,84,0.25);
}

.review-btn-approve:hover {
    background: #146c43;
    transform: translateY(-1px);
}

.review-btn-reject {
    flex: 1;
    padding: 12px 24px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(220,53,69,0.25);
}

.review-btn-reject:hover {
    background: #b02a37;
    transform: translateY(-1px);
}

.request-icon, .approved-icon, .rejected-icon,.danger-icon,.warning-icon {
    font-size: 2rem !important; /* adjust size here */
}