/* Header background styling */
.header-background {
    background-image: url('images/header-background.png'); /* Ensure the image path is correct */
    background-size: cover;
    background-position: center;
    color: rgb(255, 255, 255);
    padding: 20px 0;
    position: relative;
    display: flex; /* Use flexbox for alignment */
    justify-content: space-between; /* Push logos to opposite ends */
    align-items: center; /* Center items vertically */
}

/* Style for the header text */
.header-background h1 {
    font-size: 32px;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Add text shadow for better readability */
    flex: 1; /* Allow the text to take up remaining space */
    text-align: center; /* Center the text */
}

/* Override teacher icon color inside h1 */
h1 .fa-chalkboard-teacher {
    color: #1a365d !important;
}



/* Style for the logos */
.header-background img.neust-logo
{
    width: 200px;
    height: 200px;
    margin: 0 10px;
}

.header-background img.logo {
    width: 200px;
    height: 200px;
    margin: 10px;
}

/* Navigation bar styling */
nav {
    background-color: #333;
    color: white;
    padding: 1px 0;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 15px;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-size: 20px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #FFD700;
}

nav ul li a.active {
    color: #FFD700;
    font-weight: bold;
}

/* Style for the image container */
.image-container {
    display: flex;
    justify-content: flex-start; /* Align images to the left */
    align-items: center;
    gap: 20px; /* Space between images */
    margin: 20px 0;
    padding-left: 20px; /* Add padding to create space from the left edge */
}

/* Style for the images */
.neust-image {
    max-width: 700px; /* Adjust the size as needed */
    height: auto;
    border-radius: 10px; /* Optional: Add rounded corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Optional: Add a shadow */
}

/* Enhanced Teacher Manager Styles */
.teacher-manager-container {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.teacher-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.1);
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.building-card {
    background-color: white;
    border-radius: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.building-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.teacher-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.15);
}

.teacher-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.teacher-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.teacher-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 20px;
    border: 2px solid #000000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.teacher-info {
    flex: 1;
}

.teacher-info h3 {
    margin: 0 0 5px 0;
    color: #2a2b3c;
    font-size: 1.3rem;
    font-weight: 600;
}

.teacher-info small {
    color: #666;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 5px;
}

.teacher-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    justify-content: flex-end;
}

.btn-teacher-edit {
    background: #1a365d !important;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-teacher-delete {
    background: #ff0000 !important;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-teacher-edit:hover, .btn-teacher-delete:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .teacher-manager-container {
        grid-template-columns: 1fr;
        padding: 15px;
        gap: 20px;
    }

    .teacher-card {
        padding: 20px;
        margin: 0 auto;
        max-width: 100%;
    }

    .teacher-avatar {
        width: 70px;
        height: 70px;
    }

    /* Improve button touch targets */
    .btn-teacher-edit,
    .btn-teacher-delete,
    .btn-add-schedule {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 20px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* Better form inputs for mobile */
    .form-group input[type="text"],
    .form-group input[type="file"],
    .form-group input[type="time"] {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px;
        min-height: 44px;
    }

    /* Improve search box for mobile */
    .search-box {
        width: 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .search-box input {
        font-size: 16px; /* Prevent zoom on iOS */
        padding: 12px 8px;
    }

    /* Better modal for mobile */
    .modal-content {
        margin: 10px;
        width: calc(100% - 20px);
        max-height: 90vh;
        padding: 20px;
    }

    .modal h2 {
        font-size: 1.3rem;
    }

    /* Improve navigation spacing */
    nav ul li {
        margin: 10px;
    }

    nav ul li a {
        font-size: 18px;
        padding: 12px 16px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .teacher-manager-container {
        padding: 10px;
        gap: 15px;
    }

    .teacher-card {
        padding: 15px;
    }

    .teacher-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .teacher-avatar {
        width: 60px;
        height: 60px;
        margin: 0 auto 15px auto;
    }

    .teacher-info h3 {
        font-size: 1.1rem;
    }

    .teacher-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-teacher-edit,
    .btn-teacher-delete {
        width: 100%;
        justify-content: center;
    }

    /* Stack schedule rows on very small screens */
    .schedule-row {
        flex-direction: column;
        gap: 8px;
    }

    .schedule-row input {
        width: 100%;
    }

    .schedule-row .removeScheduleBtn {
        width: 100%;
        padding: 10px;
    }

    /* Improve modal for very small screens */
    .modal-content {
        margin: 5px;
        width: calc(100% - 10px);
        padding: 15px;
    }

    .modal h2 {
        font-size: 1.2rem;
    }

    /* Better typography for small screens */
    body {
        font-size: 14px;
    }

    .header-background h1 {
        font-size: 24px;
    }

    .header-background img.neust-logo,
    .header-background img.logo {
        width: 150px;
        height: 150px;
    }
}

/* Enhanced Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal h2 {
    color: #2a2b3c;
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close:hover {
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group input[type="time"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input[type="text"]:focus {
    border-color: #6f71f7;
    outline: none;
    box-shadow: 0 0 0 3px rgba(111, 113, 247, 0.2);
}

.validation-message {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    min-height: 20px;
    color: #e74c3c;
}

/* Loading spinner for submit button */
.fa-spinner {
    margin-right: 8px;
}

/* Success/error states */
input:valid {
    border-color: #1a365d !important;
}

input:invalid {
    border-color: #fffdfd !important;
}

/* Character counter */
.char-counter {
    font-size: 0.8rem;
    color: #7f8c8d;
    text-align: right;
    margin-top: 3px;
}

/* Schedule row styling */
.schedule-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.schedule-row input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.schedule-row input:focus {
    border-color: #6f71f7;
    outline: none;
    box-shadow: 0 0 0 2px rgba(111, 113, 247, 0.2);
}

.schedule-row .removeScheduleBtn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

.schedule-row .removeScheduleBtn:hover {
    background: #c0392b;
}

/* Add schedule button */
.btn-add-schedule {
    background: #1a365d !important;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add-schedule:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Preview for new teacher photo */
.picture-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 10px;
    border: 3px solid #eee;
    display: none;
}

.current-picture {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    display: block;
}

/* Schedule Display Styles */
.schedule-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.schedule-day-group {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.schedule-day-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.schedule-day-group h4 {
    margin: 0 0 10px 0;
    color: #2a2b3c;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.schedule-item-display {
    background: white;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 6px;
    border-left: 4px solid #FFD700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.schedule-item-display strong {
    color: #2a2b3c;
    font-size: 1rem;
    display: block;
    margin-bottom: 4px;
}

.schedule-time {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.no-schedule {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 6px;
    border: 1px dashed #dee2e6;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .teacher-manager-container {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
    }
}

/* Rest of original button styles remain unchanged */
button:not(.btn-close) {
    background: #FFD700;
    border: none;
    color: #2a2b3c;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Search box styling */
.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 8px;
    padding: 5px 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 300px;
}

.search-box input {
    border: none;
    outline: none;
    padding: 8px;
    flex: 1;
    font-size: 16px;
}

.search-box button.search-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFD700;
    border-radius: 5px;
    border: none;
    color: #2a2b3c;
    cursor: pointer;
}

.search-box button.search-btn:hover {
    background: #eee242;
}

button:not(.btn-close):hover {
    background: #eee242;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Footer styling */
footer {
    background: #2a2b3c;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 14px;
    position: relative; /* Change from fixed to relative */
    width: 100%;
    bottom: 0;
}
/* Global font family */
body {
    font-family: 'Century Gothic', sans-serif;
}

/* Set the NEUST background image for the entire page */
body.background-image {
    background-image: url('images/neust.png'); /* Ensure the image path is correct */
    background-size: cover; /* Make the image cover the entire page */
    background-position: center; /* Center the image */
    background-repeat: no-repeat; /* Prevent the image from repeating */
    height: 100vh; /* Make the body take up the full viewport height */
    margin: 0;
    display: flex;
    justify-content: center; /* Center content horizontally */
    align-items: center; /* Center content vertically */
}

/* Login container styling */
.login-container {
    background: rgba(255, 255, 255, 0.9); /* Semi-transparent white background */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a shadow for better visibility */
    text-align: center;
    width: 100%;
    max-width: 400px; /* Limit the width of the form */
}

/* Login form heading */
.login-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #ffffff;
}

/* Form group styling */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

/* Register link styling */
.register-link {
    margin-top: 15px;
    font-size: 14px;
    color: #555;
}

.register-link a {
    color: #6f71f7;
    text-decoration: none;
}

.register-link a:hover {
    text-decoration: underline;
}
/* Ensure the body takes up the full height */
body {
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Sidebar styling */
.sidebar {
    width: 250px;
    background-color: #2a2b3c;
    color: white;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 15px;
}

.sidebar ul li a {
    text-decoration: none;
    color: white;
    font-size: 16px;
    display: block;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background-color: #6366f1;
}

/* Main content styling */
.content {
    flex: 1;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    overflow-y: auto;
}

/* Main content styling for the map page */
#map {
    width: 100%;
    height: calc(100vh - 80px); /* Adjust the height to fit within the viewport minus the header and footer */
    margin: 0;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
}
/* Close button styling */
.close-button-container {
    position: absolute;
    top: 20px;
    right: 20px;
}

.close-button {
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    color: white;
    background: #ff4d4d; /* Red background for the button */
    padding: 5px 10px;
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.close-button:hover {
    background: #ff1a1a; /* Darker red on hover */
    transform: scale(1.1); /* Slightly enlarge the button on hover */
}
/* Styling for the register link below the login form */
.register-link {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #555;
}

.register-link a {
    color: #6366f1;
    text-decoration: none;
    font-weight: bold;
}

.register-link a:hover {
    text-decoration: underline;
}

/* Enhanced Teacher Popup Info Styles */
.teacher-popup-info {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 20px;
    max-width: 350px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border: 2px solid #FFD700;
    scrollbar-width: thin;
    scrollbar-color: #FFD700 #f1f1f1;
}

.teacher-popup-info::-webkit-scrollbar {
    width: 6px;
}

.teacher-popup-info::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.teacher-popup-info::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 10px;
}

.teacher-popup-info::-webkit-scrollbar-thumb:hover {
    background: #e6c200;
}

.name-section {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #FFD700;
}

.name-section h3 {
    margin: 0 0 5px 0;
    color: #2a2b3c;
    font-size: 1.4rem;
    font-weight: 700;
}



.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    position: relative;
}

.profile-photo {
    position: relative;
    margin-bottom: 8px;
}

.teacher-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #FFD700;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.1),
        0 0 0 1px rgba(255, 215, 0, 0.5) inset,
        0 0 20px rgba(255, 215, 0, 0.2);
    position: relative;
}

.teacher-photo::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700, #FFA500);
    border-radius: 50%;
    z-index: -1;
    animation: frameGlow 2s linear infinite;
}

@keyframes frameGlow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.teacher-photo.fallback {
    background: linear-gradient(135deg, #FFD700, #e6c200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    border: 4px solid #FFD700;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.1),
        0 0 0 1px rgba(255, 215, 0, 0.5) inset,
        0 0 20px rgba(255, 215, 0, 0.2);
}

.profile-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.building-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.building-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.building-name {
    margin: 0;
    color: #2a2b3c;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
}

.schedule-list {
    margin-top: 15px;
    list-style: none;
    padding: 0;
}

.schedule-list li {
    background: white;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid #FFD700;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.schedule-list li:hover {
    transform: translateX(2px);
}

.schedule-list li strong {
    color: #2a2b3c;
    font-size: 1rem;
    display: block;
    margin-bottom: 4px;
}

.schedule-list li .schedule-time {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.view-more {
    text-align: center;
    background: none;
    border: none;
    color: #6f71f7;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.view-more:hover {
    color: #190f31;
}

.popup-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: space-between;
}

.btn-directions, .btn-close-popup {
    flex: 1;
    padding: 10px 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-directions {
    background: linear-gradient(135deg, #FFD700, #e6c200);
    color: #2a2b3c;
    box-shadow: 0 4px 8px rgba(255,215,0,0.3);
}

.btn-directions:hover {
    background: linear-gradient(135deg, #e6c200, #FFD700);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255,215,0,0.4);
}

.btn-close-popup {
    background: #4A90E2;
    color: white;
    box-shadow: 0 4px 8px rgba(74,144,226,0.3);
}

.btn-close-popup:hover {
    background: linear-gradient(135deg, #8657f5, #6f71f7);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(111,113,247,0.4);
}

/* Responsive adjustments for teacher popup */
@media (max-width: 768px) {
    .teacher-popup-info {
        max-width: 90vw;
        padding: 15px;
        max-height: 70vh;
    }

    .name-section h3 {
        font-size: 1.2rem;
    }

    .teacher-photo {
        width: 60px;
        height: 60px;
    }

    .profile-section, .building-section {
        padding: 12px;
    }

    .building-name {
        font-size: 1rem;
    }

    .popup-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-directions, .btn-close-popup {
        padding: 12px 15px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

@media (max-width: 480px) {
    .teacher-popup-info {
        max-width: 95vw;
        padding: 10px;
        margin: 10px;
    }

    .name-section h3 {
        font-size: 1.1rem;
    }

    .teacher-photo {
        width: 50px;
        height: 50px;
    }

    .profile-section, .building-section {
        padding: 10px;
    }

    .schedule-list li {
        padding: 8px 10px;
    }

    .schedule-list li strong {
        font-size: 0.9rem;
    }

    .schedule-list li .schedule-time {
        font-size: 0.8rem;
    }
}

/* ID Card Style for Teacher Popup */
.teacher-id-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    max-width: 350px;
    display: flex;
    flex-direction: row;
    gap: 20px;
    position: relative;
    overflow: hidden;
    font-family: Arial, sans-serif;
}

.teacher-id-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1a365d, #FFD700);
}

.id-photo-container {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100px;
}

.id-photo {
    width: 80px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid #FFD700;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.id-photo.fallback {
    background: #FFD700;
    color: white;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #FFD700;
    border-radius: 8px;
    height: 100px;
    width: 80px;
}

.id-info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.id-name-section {
    margin-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
}

.id-name {
    margin: 0 0 4px 0;
    color: #2a2b3c;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: left;
    line-height: 1.2;
}

.id-designation {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
}

.id-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

.id-status-badge.in-class {
    background: #4caf50;
    color: white;
}

.id-status-badge.schedule {
    background: #ff9800;
    color: white;
}

.id-details {
    margin: 12px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 10px;
    background: #fafafa;
}

.id-detail-row {
    display: flex;
    flex-direction: column;
    padding: 4px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid #e9ecef;
}

.id-detail-row:last-child {
    border-bottom: none;
}

.id-detail-label {
    color: #666;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.id-detail-value {
    color: #2a2b3c;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: left;
}

.id-schedule-section {
    margin-top: 10px;
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
}

.id-schedule-list {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    max-height: 80px;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    padding: 8px;
    background: #fafafa;
}

.id-schedule-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.id-schedule-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    margin-bottom: 2px;
    font-size: 0.8rem;
    border-bottom: 1px solid #f5f5f5;
}

.id-schedule-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.id-schedule-item strong {
    color: #2a2b3c;
    font-weight: 600;
    flex: 1;
}

.id-schedule-item .time {
    color: #666;
    font-weight: 500;
    white-space: nowrap;
}

.id-view-more {
    text-align: center;
    margin-top: 5px;
    color: #1a365d;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
    background: none;
    border: none;
    padding: 0;
}

.id-view-more:hover {
    color: 1a365d;
}

.id-actions {
    display: none;
}

/* Responsive for ID Card */
@media (max-width: 768px) {
    .teacher-id-card {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        max-width: 300px;
    }

    .id-photo-container {
        width: auto;
        align-items: center;
    }

    .id-photo {
        width: 70px;
        height: 90px;
    }

    .id-photo.fallback {
        width: 70px;
        height: 90px;
        font-size: 20px;
    }

    .id-name {
        font-size: 1.25rem;
    }

    .id-designation {
        font-size: 0.9rem;
    }

    .id-details {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 8px;
    }

    .id-detail-row {
        font-size: 0.8rem;
    }

    .id-detail-label {
        font-size: 0.75rem;
    }

    .id-detail-value {
        font-size: 0.85rem;
    }

    .id-schedule-list {
        max-height: 70px;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }

    .id-schedule-list::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .id-schedule-item {
        font-size: 0.75rem;
    }

    .id-actions {
        flex-direction: column;
        gap: 6px;
    }

    .id-btn-directions,
    .id-btn-close {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .teacher-id-card {
        max-width: 95vw;
        padding: 12px;
    }

    .id-photo {
        width: 60px;
        height: 80px;
    }

    .id-photo.fallback {
        width: 60px;
        height: 80px;
        font-size: 18px;
    }

    .id-name {
        font-size: 1.15rem;
    }

    .id-status-badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .id-details {
        padding: 6px;
        gap: 4px;
    }

    .id-detail-row {
        padding: 3px 0;
        font-size: 0.75rem;
    }

    .id-detail-label {
        font-size: 0.7rem;
    }

    .id-detail-value {
        font-size: 0.8rem;
    }

    .id-schedule-list {
        max-height: 60px;
        padding: 6px;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }

    .id-schedule-list::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .id-schedule-item {
        font-size: 0.7rem;
        padding: 3px 0;
    }
}

/* Custom golden yellow navbar for teacher dashboard */
.golden-yellow-navbar {
    background: linear-gradient(135deg, #000000 0%, #e6c200 100%) !important;
}

/* Custom dark blue background for teacher dashboard */
.dark-blue-bg {
    background-color: #1a365d !important;
    color: white !important;
}

/* Golden yellow and secondary blue styling for card-body text-center */
.card-body.text-center {
    background-color: #ffffff !important;
    color: #113054 !important;
    border: 2px solid #000000;
    border-radius: 8px;
}

.teacher-card .card-body.text-center {
    background-color: #ffffff !important;
    color: rgb(0, 0, 0) !important;
    border: 2px solid #000000;
    border-radius: 8px;
    padding: 20px;
}

/* Default routing line style */
.leaflet-routing-line {
    stroke: #1a365d; /* Dark Blue */
    stroke-width: 3px;
    stroke-opacity: 0.9;
    stroke-dasharray: 10, 10;
}

/* Make routing line visible in satellite mode */
.satellite-mode-active .leaflet-routing-line {
    stroke: white !important; /* White color for visibility */
    stroke-width: 4px !important; /* Slightly thicker */
    stroke-opacity: 1 !important;
    stroke-dasharray: 5, 10 !important; /* Different dash pattern */
    /* Add a stroke outline for better contrast */
    paint-order: stroke fill;
    stroke-linejoin: round;
    stroke-linecap: round;
}

/* Completely hide the routing instructions panel container */
.leaflet-routing-container.leaflet-routing-container-hide {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden !important;
}
