/* Beautiful centered white container design */

/* Blue gradient background for entire page */
.gradient-background {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Main container wrapper */
.main-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    box-sizing: border-box;
}

/* White centered container */
.white-container {
    width: 70%;
    max-width: 1200px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
    min-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Container header styling */
.container-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    text-align: center;
}

.container-title {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Container content area */
.container-content {
    flex: 1;
    margin-bottom: 30px;
}

/* Container footer */
.container-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

/* Responsive design for the container */
@media (max-width: 1200px) {
    .white-container {
        width: 80%;
    }
}

@media (max-width: 768px) {
    .white-container {
        width: 95%;
        padding: 20px;
        margin: 20px 0;
    }
    
    .main-container {
        padding: 20px 10px;
    }
    
    .container-title {
        font-size: 22px;
    }
}

/* Reset some existing styles for the new design */
.nav-tabs .nav-link {
    border-radius: 0.5rem 0.5rem 0 0;
    margin-right: 5px;
}

/* Ensure consistent sizing for date and time inputs */
.flatpickr-input {
    padding: 0.375rem 0.75rem;
    box-sizing: border-box;
    width: 100%;
}

/* Set a consistent height and width for all input boxes in the appointment form */
#slotDate, #startTime, #endTime {
    height: 38px;
    width: 100%;
}

/* Style for the appointment slot cards */
.slot-card {
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1rem;
}

.slot-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.slot-card.selected {
    border: 2px solid var(--bs-primary);
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--bs-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Basic spacing adjustments */
.card {
    margin-bottom: 20px;
    border-radius: 0.5rem;
}

.card-header {
    border-radius: 0.5rem 0.5rem 0 0;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
    }
}

/* Add spacing for card content */
.card-body {
    padding: 1.5rem;
}

/* Style for appointment details */
.appointment-detail {
    border-left: 3px solid var(--bs-primary);
    padding-left: 10px;
    margin-bottom: 10px;
}

/* Highlight important information */
.highlight {
    background-color: var(--bs-primary-bg-subtle);
    border-radius: 0.25rem;
    padding: 0.5rem;
    margin: 0.5rem 0;
}

/* Custom badge for appointment status */
.badge-available {
    background-color: var(--bs-success);
    color: white;
}

.badge-booked {
    background-color: var(--bs-danger);
    color: white;
}

/* Custom confirmation system */
.confirm-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
    width: 90%;
    max-width: 500px;
    background-color: var(--bs-dark);
    color: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: none;
}

.confirm-toast-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.confirm-toast-actions button {
    margin-left: 10px;
}

/* Make sure modals have proper z-index */
.modal {
    z-index: 1050;
}

/* Add some contrast to date display */
.date-display {
    font-weight: bold;
    color: var(--bs-primary);
}

/* Professional form styling to match medical appointment templates */
.form-control, .form-select {
    height: 42px;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s ease;
    background-color: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
    outline: none;
}

/* Textarea specific styling */
textarea.form-control {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

/* Label styling for professional look */
.form-label.fw-semibold {
    color: #495057;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 600;
}

/* Section headers */
.border-bottom {
    border-color: #e9ecef !important;
}

/* Professional alert styling */
.alert.border-start {
    border-left-width: 4px !important;
    background-color: #f8f9ff;
    border-color: #0d6efd;
}

/* Button styling */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-width: 1.5px;
}

/* Form validation styling */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.53-.53c.39-.39.97-.39 1.36 0L5.4 7.41c.39.39.97.39 1.36 0l2.54-2.54c.39-.39.97-.39 1.36 0l.53.53c.39.39.39.97 0 1.36L5.04 13.91c-.39.39-.97.39-1.36 0z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Card improvements */
.card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: #adb5bd;
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0 !important;
}

/* Clean appointment form styling for white container */
#bookingForm {
    background: transparent;
    padding: 0;
    margin: 0;
    border-radius: 0;
}

/* Clean form container within white box */
.appointment-form {
    background: transparent;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    position: relative;
    overflow: visible;
}

/* Jotform-style appointment form styling */
.selected-time-banner {
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border: 2px solid #4a90e2;
    border-radius: 15px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.15);
    margin-bottom: 30px;
}

.time-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: white;
    font-size: 18px;
}

.appointment-form {
    background: #ffffff;
    padding: 0;
    margin: 0;
}

.form-title-section {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f8f9fa;
}

.form-title {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.form-subtitle {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 0;
    line-height: 1.5;
}

.form-section {
    background: linear-gradient(135deg, #f8fbff 0%, #f0f8ff 100%);
    border: 2px solid #d1e7fd;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 3px 10px rgba(74, 144, 226, 0.08);
}

.section-title {
    color: #4a90e2;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #4a90e2;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group.half-width {
    grid-column: span 1;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    color: #4a90e2;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required {
    color: #e74c3c;
    font-weight: 700;
}

.form-control, .form-select {
    height: 52px;
    border: 3px solid #4a90e2;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 16px;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25), 0 4px 15px rgba(74, 144, 226, 0.2);
    outline: none;
    transform: translateY(-2px);
}

.form-control:hover, .form-select:hover {
    border-color: #5a7ce8;
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.15);
}

textarea.form-control {
    height: auto;
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.form-help {
    color: #6c757d;
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.4;
}

.form-submit-section {
    background: #ffffff;
    padding: 24px 0;
    margin-top: 32px;
    border-top: 2px solid #f8f9fa;
}

.submit-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.btn-submit {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    border: none;
    border-radius: 8px;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    transition: all 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    background: linear-gradient(135deg, #0b5ed7 0%, #0a58ca 100%);
}

.btn-secondary {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    border-radius: 8px;
    padding: 12px 24px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

/* Responsive design */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.half-width {
        grid-column: span 1;
    }
    
    .submit-buttons {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    
    .btn-submit, .btn-secondary {
        width: 100%;
        text-align: center;
    }
    
    .form-title {
        font-size: 24px;
    }
    
    .selected-time-banner .d-flex {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
}
