/* Custom styles for the home page */

.main-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.date-display {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 18px;
    color: #fff;
    z-index: 10;
}

.time-part {
    font-size: 5rem;
    display: block;
    font-weight: bold;
}

.date-part {
    font-size: 3rem;
}

.content-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* Room status panels */
.main-card {
    width: 70%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 100vh;
    transition: background-color 0.5s ease;
}

/* Available state - Green */
.main-card.available {
    background-color: #6abe8a;
}

/* Occupied state - Red */
.main-card.occupied {
    background-color: #d9534f;
}

.status-heading {
    color: white;
    font-size: 10rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

/* Phone-specific adjustments */
@media only screen and (max-width: 767px) {
    .status-heading {
        font-size: 5rem;
        margin-bottom: 1.5rem;
    }
    
    .time-part {
        display: none;
    }
    
    .date-part {
        font-size: 2rem;
    }
    
    .circle-button {
        width: 140px;
        height: 140px;
    }
    
    .booking-detail {
        font-size: 1.4rem;
    }
    
    .booking-info-box {
        padding: 15px;
    }
    
    .reservation-button {
        font-size: 1.4rem;
    }
    
    .reservation-date {
        font-size: 1.2rem;
    }
    
    .reservation-time {
        font-size: 1.3rem;
    }
    
    .reservation-info {
        font-size: 1.2rem;
    }
    
    .add-new-booking-btn {
        font-size: 1.3rem;
        padding: 10px 15px;
    }
    
    .add-new-booking-btn i {
        font-size: 1.4rem;
    }
    
    .form-group label {
        font-size: 1rem;
    }
    
    .student-item {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .form-check-label {
        font-size: 0.95rem;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    .modal-content{
        width: auto !important;
        height: 100% !important;
        margin: 0, 0 !important;
    }
}

.circle-button {
    width: 180px;
    height: 180px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.circle-button:hover {
    transform: scale(1.05);
    background-color: rgba(0, 0, 0, 0.3);
}

/* Booking info box for occupied state */
.booking-info-box {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 35px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 22px;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.booking-detail {
    margin-bottom: 0;
    font-size: 2.4rem;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
}

.detail-label {
    font-weight: 600;
    color: #333;
    margin-right: 15px;
    min-width: 100px;
}

.detail-value {
    color: #d9534f;
    font-weight: 600;
    flex-grow: 1;
}

.right-panel {
    width: 30%;
    background-color: #f5f5f5;
    padding: 20px;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

.day-section {
    margin-bottom: 30px;
    flex-grow: 0;
}

.day-section h3 {
    font-size: 2.2rem;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #ddd;
    padding-bottom: 8px;
}

.reservation-item {
    background-color: white;
    padding: 18px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #6abe8a;
    position: relative;
}

/* Active booking styling */
.reservation-item.active {
    border-left: 4px solid #d9534f;
    background-color: #fff9f9;
}

.active-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #d9534f;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
}

.reservation-button {
    background: none;
    border: none;
    color: #0077cc;
    cursor: pointer;
    padding: 0;
    text-align: left;
    width: 100%;
    font-size: 1.8rem;
}

.reservation-date {
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 6px;
    font-weight: 500;
}

.reservation-time {
    font-size: 1.7rem;
    font-weight: 600;
    margin: 10px 0;
    color: #333;
}

.reservation-info {
    font-size: 1.6rem;
    margin-top: 8px;
    line-height: 1.4;
}

/* Add New Booking button for occupied state */
.add-new-booking-container {
    margin-top: auto;
    padding: 15px 0;
    border-top: 1px solid #ddd;
    text-align: center;
    position: sticky;
    bottom: -20px;
    background-color: #f5f5f5;
}

.add-new-booking-btn {
    background-color: #0d6efd;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.2s ease;
    width: 90%;
}

.add-new-booking-btn i {
    margin-right: 10px;
    font-size: 1.8rem;
}

.add-new-booking-btn:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content-container {
        flex-direction: column;
    }

    .main-card, .right-panel {
        width: 100%;
    }

    .main-card {
        min-height: 50vh;
    }

    .booking-info-box {
        width: 90%;
    }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: modalopen 0.3s;
    font-family: Arial, sans-serif;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 500;
}

.close-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: black;
}

.modal-body {
    padding: 20px;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.search-container {
    position: relative;
}

.clear-search {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    z-index: 10;
}

.student-dropdown {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.student-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    font-size: 1rem;
}

.student-item:hover {
    background-color: #f5f5f5;
}

.selected-students {
    margin-top: 10px;
}

.student-chip {
    display: inline-flex;
    align-items: center;
    background-color: #f0f0f0;
    padding: 5px 10px;
    margin: 5px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.remove-student {
    margin-left: 5px;
    font-weight: bold;
    cursor: pointer;
}

.checkbox-group {
    margin: 15px 0;
}

.form-check {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.form-check-input {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    margin-top: 3px;
}

.form-check-label {
    font-weight: bold;
    font-size: 1.05rem;
}

.permission-status {
    font-weight: bold;
    color: #d32f2f;
    margin-left: 4px;
}

.status-yes {
    color: green;
}

.status-no {
    color: #d32f2f;
}

.class-hours {
    margin-top: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hours-row {
    display: block;
    margin-bottom: 10px;
}

.hour-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.hour-checkbox label {
    margin-bottom: 0;
    font-weight: normal;
    display: flex;
    align-items: center;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    gap: 10px;
}

.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

.btn-primary {
    background-color: #0d6efd;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

@keyframes modalopen {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom styles for the tablet display on door */
@media only screen and (min-width: 768px) and (max-width: 1200px) {
    /* Adjust date display for better visibility */
    .date-display {
        top: 30px;
        left: 30px;
        font-size: 24px;
    }

    .time-part {
        font-size: 6rem;  /* Increased from 5rem */
        line-height: 1.1;
    }

    .date-part {
        font-size: 3.5rem;  /* Increased from 3rem */
    }

    /* Enhance the right panel for better readability */
    .right-panel {
        padding: 35px 30px;
        width: 35%;  /* Slightly wider right panel */
    }

    .day-section h3 {
        font-size: 2.5rem;  /* Increased from 2.2rem */
        margin-bottom: 25px;
        border-bottom: 3px solid #ddd;
        padding-bottom: 12px;
    }

    .reservation-item {
        padding: 25px;
        margin-bottom: 22px;
        border-radius: 10px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.15);
        border-left: 6px solid #6abe8a;
    }

    .reservation-item.active {
        border-left: 6px solid #d9534f;
        background-color: #fff9f9;
    }

    .reservation-button {
        font-size: 2.2rem;  /* Increased from 1.8rem */
    }

    .reservation-date {
        font-size: 1.8rem;  /* Increased from 1.5rem */
        margin-bottom: 8px;
    }

    .reservation-time {
        font-size: 2rem;  /* Increased from 1.6rem */
        margin-bottom: 10px;
    }

    .reservation-info {
        font-size: 1.8rem;  /* Increased from 1.6rem */
        line-height: 1.5;
    }

    /* Enhance modal for better touch interaction */
    .modal-content {
        max-width: 100%;
  
    }

    .modal-header h5 {
        font-size: 2.4rem;
    }

    .close-modal {
        font-size: 3rem;
        padding: 0 15px;
    }

    .modal-body {
        padding: 30px;
    }

    /* Improve form controls for touch */
    .form-group label {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }

    .form-control {
        padding: 16px;
        font-size: 1.8rem;
        border-radius: 8px;
        height: auto;
    }

    /* Student selection improvements */
    .student-item {
        padding: 18px 20px;
        font-size: 1.8rem;
        border-bottom: 2px solid #eee;
    }

    .selected-student-item {
        font-size: 1.7rem;
        padding: 10px 18px;
        margin: 10px 5px;
        background-color: #e9f4ff;
        border-radius: 8px;
        display: inline-block;
    }

    .remove-student {
        font-size: 2rem;
        margin-left: 8px;
        padding: 0 8px;
    }

    /* Hour selection improvements */
    .class-hours {
        gap: 18px;
    }

    .hour-checkbox {
        margin-bottom: 18px;
    }

    .hour-checkbox label {
        font-size: 1.7rem;
    }

    .form-check-input {
        width: 28px;
        height: 28px;
        margin-right: 15px;
    }

    /* Button enhancements */
    .btn {
        padding: 15px 28px;
        font-size: 1.8rem;
        border-radius: 10px;
    }
}

/* Adjustments for touch interface */
@media only screen and (max-width: 1200px) {
    .circle-button {
        width: 220px;
        height: 220px;
    }

    .circle-button:hover {
        transform: scale(1.1);
        transition: transform 0.2s ease;
    }

    /* Make hover state visible on touch */
    .reservation-item:active {
        background-color: #f0f7ff;
        transform: scale(0.98);
        transition: all 0.2s ease;
    }
}