/* =========================
   General Page
========================= */

body {
    font-family: Arial, sans-serif;
   text-align: center;
    margin: 0px;
    background-color: #f8f8f8;
    color: #333;
}

body > h2 {
    text-align: center;
}

/* Library logo */
.logo {
    display: block;
    width: 80px;
    max-width: 100%;
    height: auto;
    margin: 0 auto 10px auto;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: scale(1.05);
}

/* =========================
   Header
========================= */

.page-header {
    text-align: center;

    background-color: #6e2d93;
    color: white;

    padding: 10px 20px 15px;
    margin: 0 0 30px 0;

    width: 100%;
    box-sizing: border-box;

    border-radius: 0;
}

.page-header h1 {
    margin: 0;
    font-size: 36px;
}

.page-header h2 {
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: normal;
}

.page-header p {
    margin: 0;
    color: #666;
    font-size: 16px;
}


/* =========================
   Appointment List
========================= */

#dates {
    max-width: 700px;
    margin: 0 auto;
}


/* Each day section */

.day-section {
    margin-bottom: 35px;
}


/* Date heading */

.day-section h3 {
    margin-bottom: 15px;
    font-size: 22px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 6px;
}

/* =========================
   MONTH SECTION
   ========================= */

.month-section {
    margin-bottom: 45px;
}


/* =========================
   MONTH HEADER
   ========================= */

.month-heading {
    grid-column: 1 / -1;

    margin: 40px 0 0 0;
    padding: 0 0 10px 0;

    border-bottom: 2px solid #d9d9d9;

    font-size: 26px;
}

/* =========================
   CALENDAR GRID
   ========================= */

.month-grid {
    display: grid;

    grid-template-columns: repeat(
        auto-fit,
        minmax(220px, 1fr)
    );

    gap: 18px;

    max-width: 1200px;

    margin: 0 auto;
}

/* =========================
   MONTH-SPECIFIC DATE COLORS
   ========================= */

.day-heading.august {
    background-color: #E25D4D;
}

.day-heading.september {
    background-color: #D6B65C;
}

.day-heading.october {
    background-color: #FF9B4A;
}

.day-heading.november {
    background-color: #B23A48;
}

.day-heading.december {
    background-color: #A7C6E9;
}

.day-heading.january {
    background-color: #E6F2FA;
}

.day-heading.february {
    background-color: #FF8FB3;
}

.day-heading.march {
    background-color: #BFD8B6;
}

.day-heading.april {
    background-color: #F29C9C;
}

.day-heading.may {
    background-color: #E2D3F7;
}

.day-heading.june {
    background-color: #E15D6D;
}

.day-heading.july {
    background-color: #2F4B7C;
}

/* =========================
   INDIVIDUAL DAY CARD
   ========================= */

.day-section {
    background: white;

    border: 1px solid #ddd;
    border-radius: 10px;

    padding: 0 15px 15px;

    box-shadow: 0 2px 7px rgba(0, 0, 0, 0.10);

    box-sizing: border-box;
}


/* =========================
   DATE HEADER
   ========================= */

.day-heading {
    margin: 0 -15px 12px;

    padding: 12px 15px;

    background: #f3f3f3;

    border-radius: 10px 10px 0 0;

    display: flex;
    flex-direction: column;

    gap: 2px;
}


.day-name {
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
}


.day-number {
    font-size: 20px;
    font-weight: bold;
}


/* =========================
   APPOINTMENT TIME
   ========================= */

.appointment-option {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 11px 10px;

    margin-top: 8px;

    border: 1px solid #ddd;

    border-radius: 6px;

    cursor: pointer;

    transition: background-color 0.15s ease,
                border-color 0.15s ease;
}


.appointment-option:hover {
    background-color: #f5f5f5;

    border-color: #51ae43;
}


.appointment-option input {
    margin: 0;
}

/* =========================
   Appointment Cards
========================= */

.appointment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 10px;

    border: 1px solid #ccc;
    border-radius: 10px;

    background-color: white;

    cursor: pointer;
    transition: background-color 0.2s ease,
                border-color 0.2s ease,
                transform 0.15s ease;
}

.appointment-option:hover {
    background-color: #f0f6ff;
    border-color: #4a90e2;
    transform: translateY(-1px);
}


/* Bigger checkbox */

.appointment-option input {
    width: 24px;
    height: 24px;
    cursor: pointer;
}


/* Time text */

.appointment-option span {
    font-size: 18px;
}

/* =========================
   Appointment Action Buttons
   ========================= */

.appointment-status {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 12px;

    margin: 20px 0;

}

.status-button {

    width: 150px;

    padding: 10px 0;

    border: 2px solid #d9d9d9;

    border-radius: 8px;

    background: white;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    transition: all .25s ease;

}

.status-button:hover {

    transform: translateY(-2px);

    box-shadow: 0 4px 10px rgba(0,0,0,.15);

}

.cancel-button:hover {

    background: #ffd9d9;
    border-color: #d9534f;

}

.reschedule-button:hover {

    background: #dff5ff;
    border-color: #5bc0de;

}

.confirm-button:hover {

    background: #d4edda;
    border-color: #28a745;

}


.confirmed-button {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.confirmed-button:hover {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

/* =========================
   Confirmation Checkbox
========================= */

.confirmation {
    max-width: 700px;
    margin: 30px auto 10px auto;
    padding: 15px;

    background-color: white;
    border: 1px solid #ccc;
    border-radius: 10px;
}

.disclaimer-list {
    display: inline-block;
    text-align: left;
    margin: 0 auto 20px auto;
    padding-left: 20px;
    line-height: 1.6;
}

.disclaimer-list li {
    margin-bottom: 8px;
}
.confirmation label {
    display: block;
    justify-content: center;
    align-items: center;
    gap: 10px;

    font-size: 16px;
    cursor: pointer;
}

.confirmation input {
    width: 22px;
    height: 22px;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 8px;
    cursor: pointer;
}
/* =========================
   Submit Button
========================= */

#submitAppointment {
    display: block;

    margin: 40px auto;

    padding: 14px 28px;

    font-size: 18px;
    font-weight: bold;

    border: none;
    border-radius: 8px;

    background-color: #4a90e2;
    color: white;

    cursor: pointer;

    transition: background-color 0.2s ease;
}

#submitAppointment {
    background: #22418b;
}

#submitAppointment:hover {
    background-color: #357abd;
}
#submitAppointment:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

#submitAppointment:not(:disabled) {
    background-color: #51ae43;
    color: white;
    cursor: pointer;
}


/* =========================
   Mobile
========================= */

@media (max-width: 600px) {

    body {
        margin: 20px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .page-header h2 {
        font-size: 20px;
    }

    .appointment-option {
        padding: 12px;
    }

    .appointment-option span {
        font-size: 16px;
    }

}

/* =========================
   USER INFORMATION FORM
   ========================= */

.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    max-width: 700px;
    padding: 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical;
}

/* Placeholder text */

.form-group input::placeholder,
.form-group textarea::placeholder {
    font-family: Arial, sans-serif;
    font-size: 16px;
    color: #999;
}

/* =========================
   REASON FOR APPOINTMENT
   ========================= */

.reason-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 25px 0;
}

.reason-options label {
    font-weight: normal;
}

/* =========================
   FORM SECTIONS
   ========================= */

.form-section {
    max-width: 700px;
    margin: 50px auto;
}

.form-section h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* =========================
   STAFF LOGIN BUTTON
   ========================= */

.staff-button-container {

    position: fixed;

    bottom: 20px;

    left: 20px;

    z-index: 1000;

}

.staff-button-container button {

    width: 120px;

    background-color: white;

    color: #333;

    border: 2px solid #d9d9d9;

    border-radius: 10px;

    padding: 12px 20px;

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.25s ease;

}

.staff-button-container button:hover {

    background-color: #bfe8ff;

    border-color: #74bfe6;

    transform: translateY(-2px);

    box-shadow: 0 4px 10px rgba(0,0,0,.15);

}

.staff-button-container button:active {

    transform: translateY(0);

}

/* =========================
   ADMIN PAGE
   ========================= */


#errorMessage {
    color: red;
    margin-top: 15px;
    text-align: center;
}

.form-section {
    margin-bottom: 20px;
}

#appointmentList {

    margin-top: 30px;

}

/* Date heading */

.date-heading {

    margin-top: 40px;
    margin-bottom: 15px;

}

/* =========================
   ADMIN VIEW BUTTONS
========================= */

.admin-view-buttons button.active-view {
    background-color: #6b4c8a;
    color: white;
}

/* =========================
   ADMIN TOOLBAR
   ========================= */

.admin-toolbar {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 10px;

    margin: 30px 0;

}


/* =========================
   ADMIN VIEW BUTTONS
   ========================= */

.admin-view-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;

    margin-bottom: 5px;
}

.admin-view-buttons button {

    width: 220px;

    background-color: white;

    color: #333;

    border: 2px solid #d9d9d9;

    border-radius: 10px;

    padding: 14px 20px;

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;

    transition: all 0.25s ease;

}


.admin-view-buttons button:hover {

    background-color: #bfe8ff;

    border-color: #74bfe6;

    transform: translateY(-2px);

    box-shadow: 0 4px 10px rgba(0,0,0,.15);

}


.admin-view-buttons button:active {

    transform: translateY(0);

}


/* =========================
   CURRENT VIEW TITLE
   ========================= */

.admin-view-title {
    margin: 30px 0 10px 0;
    font-size: 28px;
    text-align: center;
}

}
/* =========================
   ADMIN MONTH HEADINGS
   ========================= */

.month-heading {
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #d9d9d9;
    font-size: 26px;
}

/* =========================
   ADMIN TIMESTAMP
   ========================= */
.submitted-time {

    margin-top: 18px;

    color: #666;

    font-size: 14px;

    text-align: center;

}

/* =========================
   STAFF LOGIN MODAL
   ========================= */

.modal {

    display: none;

    position: fixed;

    inset: 0;

    background: rgba(0,0,0,.45);

    justify-content: center;

    align-items: center;

    z-index: 2000;

}

.modal-content {

    background: white;

    width: 360px;

    max-width: 90%;

    border-radius: 12px;

    padding: 30px;

    text-align: center;

    box-shadow: 0 10px 25px rgba(0,0,0,.3);

}

.modal-content input {

    width: 100%;

    padding: 12px;

    margin: 20px 0;

    font-size: 16px;

    border: 2px solid #d9d9d9;

    border-radius: 8px;

    box-sizing: border-box;

}

.modal-content input:focus {

    outline: none;

    border-color: #74bfe6;

}

.modal-buttons {

    display: flex;

    justify-content: center;

    gap: 15px;

}

.modal-buttons button {

    width: 120px;

}

/* =========================
   APPOINTMENT LIST
   ========================= */

#appointmentList {
    margin-top: 30px;

    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;

    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}


/* =========================
   APPOINTMENT CARD
   ========================= */

.appointment-card {
    background: white;

    border-radius: 10px;
    padding: 20px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);

    border: 1px solid #ddd;

    box-sizing: border-box;
}

.confirmed {
    border-color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.35);
}

/* =========================
   CLEAN UP APPOINTMENT DETAILS
   ========================= */

.appointment-card ul {
    list-style: none;
    margin: 5px 0 15px 0;
    padding: 0;
}

.appointment-card li {
    margin: 3px 0;
    padding: 0;
}

.appointment-card p {
    margin: 6px 0;
}

/* =========================
   APPOINTMENT DATE
   ========================= */

.appointment-card h2 {
    font-size: 28px;
    color: #4b2c5e;
    margin: 0 0 8px 0;
}

/* =========================
   STAFF INITIALS
   ========================= */

.staff-initials-box {
    width: 250px;
    margin: 20px auto;
    padding: 15px 20px;

    background-color: #f3f3f3;
    border: 1px solid #ccc;
    border-radius: 10px;

    box-sizing: border-box;
}

.staff-initials-box h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.staff-initials-box input {
    width: 100px;
    height: 32px;
    padding: 5px 8px;

    font-size: 16px;
    text-transform: uppercase;

    border: 1px solid #bbb;
    border-radius: 6px;

    box-sizing: border-box;
}

.staff-initials-box p {
    margin: 5px 0 0 0;

    font-size: 12px;
    color: #777;
}

/* =========================
   THANK YOU PAGE
   ========================= */
.thank-you-container {
    max-width: 700px;
    margin: 60px auto;
    text-align: center;
    font-family: Arial, sans-serif;
}

.thank-you-container h1 {
    margin-bottom: 20px;
}

.thank-you-container p {
    margin: 15px 0;

   /* =========================
   Past Appointments
========================= */

.appointment-card.past-appointment {
    background-color: #eeeeee;
}


/* =========================
   Canceled Appointments
========================= */

.appointment-card.canceled-appointment {
    background-color: #f5e1e1;
}
    line-height: 1.5;
}

/* =========================
   RESCHEDULE MODAL
========================= */

.reschedule-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;

    background-color: rgba(0, 0, 0, 0.45);

    justify-content: center;
    align-items: center;
}

.reschedule-box {
    background: white;
    width: 400px;
    max-width: 90%;

    padding: 25px;
    border-radius: 12px;

    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);

    text-align: center;
}

.reschedule-box h2 {
    margin-top: 0;
}

.reschedule-box select {
    width: 100%;
    padding: 10px;
    margin: 15px 0;

    font-size: 16px;
}

.reschedule-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.reschedule-actions button {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
}

#confirmReschedule {
    background-color: #51ae43;
    color: white;
}

#cancelReschedule {
    background-color: #ddd;
    color: #333;
}
