/* Modern Appointment Booking Page Styles */

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --text-primary: #2c3e50;
    --text-muted: #6c757d;
}

/* Global Styles */
body {
   min-height: 100vh;
}

.appointment-booking-container {
    min-height: 100vh;
}

/* Header Styles */
.booking-header {
    color: white;
    padding: 3rem 0;

}

.header-content {
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
}

/* Filters Card */
.filters-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 20px;
}

.filters-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: var(--light-bg);
}

.filter-select:focus,
.filter-input:focus {
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    outline: none;
}

.clinic-select-wrapper {
    position: relative;
}

.select-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Service Filter */
.service-filter {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-checkbox {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--light-bg);
}

.service-checkbox:hover {
    border-color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.05);
}

.service-checkbox input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.service-price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Reset Button */
.btn-reset-filters {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--light-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-reset-filters:hover {
    background-color: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Clinics Section */
.clinics-section {
    margin-top: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.clinics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Clinic Card */
.clinic-card {
    background: white;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.clinic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.25);
}

.clinic-card-header {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.clinic-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clinic-logo-placeholder {
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.5;
}

.clinic-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge-open {
    background-color: rgba(40, 167, 69, 0.2);
    color: var(--success-color);
}

/* Clinic Card Body */
.clinic-card-body {
    padding: 1.5rem;
    flex: 1;
}

.clinic-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.clinic-location {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

/* Staff Section */
.staff-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.staff-title,
.services-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.staff-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 200px;
    overflow-y: auto;
}

.staff-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: var(--light-bg);
    transition: all 0.3s ease;
    cursor: pointer;
}

.staff-item:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.staff-avatar {
    flex-shrink: 0;
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.staff-info {
    flex: 1;
    min-width: 0;
}

.staff-name {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
}

.staff-role {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 0.25rem 0;
    text-transform: capitalize;
}

.staff-services {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.service-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: rgba(102, 126, 234, 0.2);
    color: var(--primary-color);
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.no-staff {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 0.75rem;
}

/* Services Section */
.services-section {
    margin-bottom: 0;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: 0.4rem;
    background-color: var(--light-bg);
    font-size: 0.9rem;
}

.service-name {
    font-weight: 500;
    color: var(--text-primary);
}

.service-price {
    font-weight: 700;
    color: var(--primary-color);
}

/* Clinic Card Footer */
.clinic-card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--light-bg);
}

.btn-book-clinic {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-book-clinic:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.btn-book-clinic:active {
    transform: translateY(0);
}

/* No Clinics Message */
.no-clinics-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.no-clinics-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Booking Modal */
.modal-content {
    border: none;
    border-radius: 1.25rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 1.25rem 1.25rem 0 0;
    padding: 1.5rem;
}

.modal-title {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 2rem;
}

.booking-info-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.info-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger-color);
    font-weight: bold;
}

.form-control-lg {
    border: 1.5px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: var(--light-bg);
}

.form-control-lg:focus {
    border-color: var(--primary-color);
    background-color: white;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    outline: none;
}

/* Doctors Grid */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.doctor-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    background-color: var(--light-bg);
}

.doctor-card:hover {
    border-color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.05);
}

.doctor-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.doctor-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.doctor-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin: 0;
}

/* Available Slots */
.available-slots-section {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
}

.slot-button {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    background-color: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.85rem;
    text-align: center;
}

.slot-button:hover:not(:disabled) {
    border-color: var(--primary-color);
    background-color: rgba(102, 126, 234, 0.05);
}

.slot-button.selected {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: var(--primary-color);
}

.slot-button:disabled {
    background-color: #e9ecef;
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Patient Details Section */
.patient-details-section {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
}

/* Form Check */
.form-check {
    padding-left: 2rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-left: -2rem;
    cursor: pointer;
    border: 1.5px solid var(--border-color);
    accent-color: var(--primary-color);
}

.form-check-label {
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-check-label a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-check-label a:hover {
    text-decoration: underline;
}

/* Modal Footer */
.modal-footer {
    padding: 0.5rem;
    background-color: var(--light-bg);
    border-radius: 0 0 1.25rem 1.25rem;
    display: flex-column;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #e9ecef;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #dee2e6;
}

/* Responsive Design */
@media (max-width: 992px) {
    .clinics-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }

    .filters-card {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.75rem;
    }

    .clinics-grid {
        grid-template-columns: 1fr;
    }

    .doctors-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .booking-header {
        padding: 2rem 0;
    }

    .page-title {
        font-size: 1.5rem;
        gap: 0.5rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }

    .filters-card {
        padding: 1.5rem;
    }

    .slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }

    .modal-dialog-scrollable {
        max-height: 100vh;
    }
}

/* Scrollbar Styles */
.staff-list::-webkit-scrollbar,
.services-list::-webkit-scrollbar {
    width: 6px;
}

.staff-list::-webkit-scrollbar-track,
.services-list::-webkit-scrollbar-track {
    background: transparent;
}

.staff-list::-webkit-scrollbar-thumb,
.services-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.staff-list::-webkit-scrollbar-thumb:hover,
.services-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clinic-card {
    animation: slideInUp 0.5s ease-out;
}
