﻿html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Board Member Modal Scrolling Styles */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom scrollbar for better appearance */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Ensure modal content doesn't break out of container */
.modal-dialog {
    max-height: 90vh;
    margin: 1.75rem auto;
    display: flex;
    align-items: center;
}

.modal-content {
    max-height: 100%;
    display: flex;
    flex-direction: column;
}

.modal-header,
.modal-footer {
    flex-shrink: 0;
}

/* Responsive modal adjustments */
@media (max-width: 576px) {
    .modal-dialog {
        max-height: 95vh;
        margin: 0.5rem;
    }
    
    .modal-body {
        max-height: 60vh;
    }
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: #b32121; /* deep red */
    color: #fff;
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 6px;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Fix Bootstrap row gutters on mobile */
.row.g-0 {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

/* Ensure no horizontal scroll */
.container-fluid {
    padding-left: 0;
    padding-right: 0;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Top Banner Styles */
.pta-top-banner {
    background: #f8f9fa;
    color: #0056b3;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.5rem 0;
}

.pta-banner-line1 {
    font-size: 1rem;
    line-height: 1.2;
}

.pta-banner-line2 {
    font-size: 0.9rem;
    line-height: 1.2;
    font-weight: 500;
}

/* Mobile: Stack banner lines */
@media (max-width: 576px) {
    .pta-banner-line1 {
        font-size: 0.85rem;
    }
    
    .pta-banner-line2 {
        font-size: 0.8rem;
    }
}

.pta-header {
    border-bottom: none;
    margin-bottom: 0;
    padding-top: 0.5rem; /* Reduced */
    padding-bottom: 0.5rem; /* Reduced */
}

.pta-header-left {
    min-width: 170px;
}

.pta-nav {
    margin-top: 0.5rem;
    margin-bottom: 0;
}

    .pta-nav li {
        margin-bottom: 4px;
    }

    .pta-nav a {
        color: #111;
        text-decoration: none;
        font-size: 1.1rem;
        transition: color 0.2s;
        font-weight: bold;
    }

        .pta-nav a:hover, .pta-nav a.active {
            color: #1769aa;
            text-decoration: underline;
        }

        .pta-nav a.active {
            color: #1769aa;
            text-decoration: underline;
            background: #eaf6ea;
            border-radius: 4px;
            position: relative;
            padding-left: 22px;
            font-weight: bold;
        }

            .pta-nav a.active::before {
                content: "➔";
                position: absolute;
                left: 6px;
                top: 50%;
                transform: translateY(-50%);
                font-size: 1.1em;
                color: #4cb96b;
            }

.pta-header-box {
    background: #fff;
    border: none;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    padding: .5rem 1.5rem .5rem 1.5rem;
}

/* Content wrapper with responsive padding */
.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 0 0.5rem;
    }
}

@media (max-width: 576px) {
    .content-wrapper {
        padding: 0 0.25rem;
    }
}

/* Header Top Section - Image Alignment with Responsive Sizing */
.pta-header-top {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.pta-logo-box, .pta-mascot-box, .pta-sponsor-box {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Image Sizing - Bigger on large screens */
.pta-logo, .pta-mascot, .sponsor-logo {
    height: 180px;
    width: 180px;
    object-fit: contain;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sponsor-logo {
    border-radius: 50%;
    border: 2px solid #4CAF50;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.pta-header-logo,
.pta-header-sponsor {
    flex: 0 0 auto;
}

.pta-header-center {
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
}

.pta-school-logo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: 125px;
}

.pta-header-sponsor div {
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Hamburger Menu Button */
.hamburger-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin: 0 auto;
    background: transparent;
    border: 2px solid #0d6efd;
    color: #0d6efd;
    transition: all 0.2s;
}

.hamburger-btn:hover, .hamburger-btn:focus {
    background: #0d6efd;
    color: white;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    width: 18px;
    height: 12px;
    justify-content: space-between;
}

.hamburger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
    border-radius: 1px;
    transition: all 0.2s;
}

/* Horizontal Navigation for Desktop */
.pta-nav-horizontal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    max-width: 100%;
    margin: 0 auto;
}

/* Navigation Link Styles */
.pta-header-nav .pta-nav-link {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
}

.pta-header-nav .pta-nav-link:focus {
    box-shadow: 0 0 0 3px #4CAF50;
    background: #e8f5e9;
}

.pta-header-nav .pta-nav-icon {
    font-size: 1.2em;
    line-height: 1;
    display: flex;
    align-items: center;
}

/* General active nav link box */
.pta-header-nav .pta-nav-link.active {
    border: 2.5px solid;
    border-radius: 8px;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    font-weight: 700;
}

/* Color-specific borders for each nav link */
.pta-header-nav .pta-nav-link.active.text-success {
    border-color: #198754;
    background: #eaf6ea;
}

.pta-header-nav .pta-nav-link.active.text-primary {
    border-color: #0d6efd;
    background: #eaf1fa;
}

.pta-header-nav .pta-nav-link.active.text-info {
    border-color: #0dcaf0;
    background: #eaf7fa;
}

.pta-header-nav .pta-nav-link.active.text-warning {
    border-color: #ffc107;
    background: #fffbe6;
}

.pta-header-nav .pta-nav-link.active.text-secondary {
    border-color: #6c757d;
    background: #f3f3f3;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    height: 100vh;
    width: 280px;
    max-width: 85vw;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.mobile-menu-overlay.show .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #0d6efd;
    color: white;
}

.mobile-menu-title {
    font-size: 1.2rem;
    font-weight: 600;
}

.mobile-menu-close {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
    padding: 0.25rem 0.5rem;
}

.mobile-menu-close:hover, .mobile-menu-close:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.mobile-menu-items {
    flex: 1;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
}

.mobile-nav-link:hover {
    background: #f8f9fa;
    text-decoration: none;
}

.mobile-nav-link.active {
    background: #e3f2fd;
    border-left: 4px solid #0d6efd;
}

.mobile-nav-icon {
    font-size: 1.3em;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Compact Year Selection */
.school-year-banner {
    font-size: 0.9rem;
    min-width: auto !important;
}

.login-display-container {
    display: flex;
    align-items: center;
}

/* Sponsor Badge Styles */
.sponsor-badge-container {
    display: inline-block;
    position: relative;
    width: 120px;
    height: 120px;
    outline: none;
    cursor: pointer;
}

    .sponsor-badge-container:focus {
        box-shadow: 0 0 0 3px #4CAF50;
    }

.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    z-index: 1;
}

.ring-bg {
    stroke: #ccc;
    stroke-width: 4;
    fill: none;
}

.ring-fill {
    stroke: #4CAF50;
    stroke-width: 4;
    fill: none;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    animation: fillRing 30s linear forwards;
}

@keyframes fillRing {
    to {
        stroke-dashoffset: 0;
    }
}

.sponsor-badge-container:hover .ring-fill,
.sponsor-badge-container:focus .ring-fill {
    animation-play-state: paused;
}

.sponsor-label.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Mobile Fallback: Progress Bar */
.sponsor-progress-bar {
    display: block;
    width: 100px;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    margin: 8px auto 0 auto;
    overflow: hidden;
}

.sponsor-progress-bar-fill {
    width: 0;
    height: 100%;
    background: #4CAF50;
    animation: fillBar 30s linear forwards;
}

@keyframes fillBar {
    to {
        width: 100%;
    }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
    .pta-logo, .pta-mascot, .sponsor-logo {
        height: 200px;
        width: 200px;
    }
    
    .pta-header-top {
        gap: 4rem;
    }
    
    .pta-nav-horizontal {
        gap: 2rem;
    }
}

/* Tablet and Mobile Styles */
@media (max-width: 991px) {
    .pta-header-top {
        gap: 2rem;
    }
    
    .pta-logo, .pta-mascot, .sponsor-logo {
        height: 140px;
        width: 140px;
    }
    
    /* Hide desktop navigation, show hamburger */
    .pta-nav-horizontal {
        display: none !important;
    }
    
    .hamburger-btn {
        display: flex !important;
    }
}

@media (max-width: 768px) {
    .pta-header-top {
        gap: 1.5rem;
    }
    
    .pta-logo, .pta-mascot, .sponsor-logo {
        height: 120px;
        width: 120px;
    }
}

/* Mobile Styles */
@media (max-width: 576px) {
    .pta-header-box {
        padding: 0.5rem 0.25rem;
        margin-bottom: 0.5rem;
    }
    
    .pta-header-top {
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .pta-logo, .pta-mascot, .sponsor-logo {
        height: 80px;
        width: 80px;
    }
    
    /* Year selection and login stack vertically */
    .d-flex.justify-content-center.align-items-center.flex-wrap.gap-3 {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .mobile-menu-content {
        width: 100%;
        max-width: 100vw;
    }
}

/* Very small mobile */
@media (max-width: 375px) {
    .pta-header-top {
        gap: 0.5rem;
    }
    
    .pta-logo, .pta-mascot, .sponsor-logo {
        height: 70px;
        width: 70px;
    }
}

.pta-header-box,
.container-fluid,
.row,
.col-12,
.col-md-10 {
    max-width: 100vw;
    box-sizing: border-box;
}

.pta-header-top > div {
    min-width: 0; /* Prevent flex children from overflowing */
}

img {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

.school-year-banner button:focus {
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.25);
}

.school-year-banner button:hover {
    background-color: #e7f1ff;
}