/* Custom Styles for Vidyalaya Attendance System */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

/* Card Enhancements */
.card {
    border-radius: 12px;
    transition: transform 0.2s;
}

.view-section {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hard override for Super Admin panel visibility */
#view-superadmin:not(.d-none) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Navbar Tweaks */
.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

/* MODULE 3: Navbar Link Hover Underline Animation */
.navbar-nav .nav-link {
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 80%;
}

/* Dynamic School Branding Banner (Below Navbar) */
.school-banner-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 15px 0 25px 0;
    text-align: center;
    flex-wrap: wrap;
}
.banner-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
    background-color: transparent;
}
.banner-school-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0d6efd;
    margin: 0;
    text-transform: uppercase;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }
}

/* Status Colors */
.text-success-custom {
    color: #28a745;
}

.text-danger-custom {
    color: #dc3545;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
    border-color: #86b7fe;
}

/* Print Styles */
@media print {

    .no-print,
    .navbar,
    #alertArea {
        display: none !important;
    }

    body {
        background-color: white;
        margin: 0;
        padding: 0;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }

    .view-section {
        margin: 0;
        padding: 0;
    }

    table {
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }

    thead {
        display: table-header-group;
    }

    tfoot {
        display: table-footer-group;
    }
}

/* Scrolling Ticker Styles */
.ticker-container {
    width: 100%;
    overflow: hidden;
    background-color: #f8f9fa;
    /* Very light grey */
    height: 30px;
    line-height: 30px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
    z-index: 10;
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
}

.ticker-item {
    display: inline-block;
    padding-left: 100%;
    /* Start outside the screen */
    animation: ticker 25s linear infinite;
    /* Adjusted speed */
    color: #555;
    font-size: 13px;
    font-weight: 500;
}

.small-icon {
    font-size: 10px;
    margin-right: 6px;
    color: #888;
    vertical-align: middle;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Ensure ticker pauses on hover for readability */
.ticker-container:hover .ticker-item {
    animation-play-state: paused;
}

/* Fixed Footer Styles */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 13px;
    font-weight: normal;
    display: flex;
    /* Flexbox for centering */
    align-items: center;
    /* Vertical center */
    justify-content: center;
    /* Horizontal center */
    z-index: 1030;
    /* Above most elements */
}

/* Add padding to body so content doesn't hide behind footer */
body {
    padding-bottom: 50px;
}

/* Print Styles for Footer */
@media print {
    .app-footer {
        position: fixed;
        bottom: 0;
        width: 100%;
        display: flex !important;
        justify-content: center;
        align-items: center;
        background-color: white;
        /* Save ink */
        border-top: 1px solid #ccc;
        color: #000;
    }

    /* Ensure footer shows on every page */
    body {
        margin-bottom: 50px;
    }
}

/* Subscription Trial Banner Styles */
.trial-banner-container { overflow: hidden; background-color: #ffc107; color: #000; padding: 5px 0; width: 100%; border-bottom: 1px solid #e0a800; }
.trial-banner-text { display: inline-block; white-space: nowrap; padding-left: 100%; animation: scrollLeft 30s linear infinite; font-weight: bold; font-size: 1rem; }
@keyframes scrollLeft { 0% { transform: translateX(0); } 100% { transform: translateX(-200%); } }

/* Utility classes for inline-style replacements */
.school-map-container { height: 350px; width: 100%; border-radius: 8px; margin-bottom: 15px; z-index: 1; }
.ls-2 { letter-spacing: 2px; }
.scrollable-260 { max-height: 260px; }
.scrollable-300 { max-height: 300px; }
.scrollable-350 { max-height: 350px; }
.login-row-container { max-width: 1200px; }