/* General Styles */
body {
    font-family: Arial, sans-serif;
    color: #333;
    background-color: #f5f5f5;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', 'Roboto', Arial, sans-serif;
    color: #0073aa;
    margin-top: 0;
}

a {
    color: #0073aa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

#patient-count-overlay {
    margin-top: 10px;
    font-style: italic;
}

/* Form Container */
.ham-form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Form Labels and Inputs */
.ham-form-container label {
    display: block;
    margin-top: 15px;
    font-weight: bold;
    color: #333;
}

.ham-arrived-button {
    background-color: #28a745;
    color: #fff;
}

.ham-arrived-button:hover {
    background-color: #218838;
}

.ham-no-show-button {
    background-color: #dc3545;
    color: #fff;
}

.ham-no-show-button:hover {
    background-color: #c82333;
}

.ham-form-container input[type="text"],
.ham-form-container input[type="date"],
.ham-form-container input[type="number"],
.ham-form-container select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.ham-form-container input[type="text"]:focus,
.ham-form-container input[type="date"]:focus,
.ham-form-container input[type="number"]:focus,
.ham-form-container select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.5);
    outline: none;
}

.ham-form-container h3 {
    margin-top: 30px;
    font-size: 18px;
    color: #0073aa;
}

/* Button Styles */
.ham-button {
    padding: 10px 15px;
    margin: 5px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
}

.ham-button:hover {
    opacity: 0.9;
}

.ham-submit-button,
.ham-create-button,
.ham-search-button {
    background-color: #0073aa;
    color: #fff;
}

.ham-submit-button:hover,
.ham-create-button:hover,
.ham-search-button:hover {
    background-color: #005a87;
}

.ham-export-button {
    background-color: #28a745;
    color: #fff;
}

.ham-export-button:hover {
    background-color: #218838;
}

.ham-cancel-button {
    background-color: #dc3545;
    color: #fff;
}

.fas {
    margin-right: 5px;
}

.ham-cancel-button:hover {
    background-color: #c82333;
}

.ham-reschedule-button {
    background-color: #17a2b8;
    color: #fff;
}

.ham-reschedule-button:hover {
    background-color: #138496;
}

/* Disable button when not allowed */
.ham-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table thead th {
    background-color: #f4f4f4;
    color: #333;
    font-weight: bold;
}

table th,
table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tbody tr:hover {
    background-color: #e9f5fb;
}

/* Responsive Tables */
@media screen and (max-width: 600px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    table tr {
        margin-bottom: 15px;
    }
    table td {
        text-align: right;
        position: relative;
        padding-left: 50%;
    }
    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 50%;
        padding-left: 15px;
        font-weight: bold;
        text-align: left;
    }
}

/* Modal Styles */
#appointment-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

#appointment-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border: none;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,.5);
}

#appointment-modal-close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

#appointment-modal-close:hover,
#appointment-modal-close:focus {
    color: #000;
    text-decoration: none;
}

/* Dashboard Container */
.ham-dashboard-container {
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Filters */
#ham-dashboard-filters {
    margin-bottom: 20px;
}

#ham-dashboard-filters label {
    font-weight: bold;
    margin-right: 10px;
}

#ham-dashboard-filters select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
}

/* Calendar */
#ham-calendar {
    max-width: 900px;
    margin: 0 auto;
}

/* Daily Appointments */
#ham-daily-appointments {
    max-width: 900px;
    margin: 30px auto;
}

#ham-daily-appointments h2 {
    margin-bottom: 15px;
}

/* Patient Details */
#ham-patient-details {
    max-width: 800px;
    margin: 20px auto;
}

#ham-patient-details h3 {
    margin-top: 30px;
}

/* PDF Content */
#pdf-content {
    max-width: 800px;
    margin: 20px auto;
    white-space: pre-wrap;
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #ddd;
}

/* New Date and Department Inputs */
.new-date,
.new-department {
    margin-right: 5px;
    padding: 5px;
}

/* Appointment Canceled */
.appointment-canceled {
    text-decoration: line-through;
    color: #999;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .ham-form-container {
        padding: 15px;
    }
    .ham-button {
        width: 100%;
        margin: 10px 0;
    }
    #appointment-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    #ham-calendar,
    #ham-daily-appointments,
    #ham-patient-details,
    #pdf-content {
        width: 100%;
        margin: 0;
        padding: 0 15px;
    }
}

/* Input Focus Styles */
input[type="text"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.5);
    outline: none;
}
