/* Pharmacy Form Styles */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.header-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.company-logo {
    max-width: 200px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.company-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 2.5rem;
    margin-top: 15px;
}

.company-description {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin: 0;
}

.progress-container {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    margin: 20px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.progress {
    height: 8px;
    border-radius: 10px;
    background-color: #e9ecef;
    margin-bottom: 10px;
}

.progress-bar {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
}

.pharmacy-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin: 20px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.form-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.form-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-title {
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.section-description {
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 25px;
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    background-color: white;
}

.form-check {
    margin-bottom: 10px;
    padding-left: 2rem;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.1rem;
    margin-left: -2rem;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-check-label {
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    padding-left: 0.5rem;
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 5px;
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.btn {
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(45deg, #218838, #1ea085);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* File Upload Styling */
.form-control[type="file"] {
    padding: 8px 15px;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    margin-right: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
}

/* Modal Styling */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-radius: 15px 15px 0 0;
    border: none;
}

.modal-title {
    font-weight: 700;
}

.btn-close {
    filter: invert(1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .company-title {
        font-size: 2rem;
    }
    
    .pharmacy-form {
        padding: 20px;
        margin: 10px 0;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0 10px;
    }
    
    .header-section {
        margin: 10px;
        padding: 20px;
    }
    
    .progress-container {
        margin: 10px;
        padding: 15px;
    }
    
    .company-title {
        font-size: 1.5rem;
    }
    
    .company-description {
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Success Messages */
.success-message {
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}

.form-control.is-valid {
    border-color: #28a745;
}

.form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Date Picker Styling - Flatpickr */
#appointment_date {
    cursor: pointer;
}

/* Flatpickr Calendar Styling */
.flatpickr-calendar {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
    opacity: 0.3;
    cursor: not-allowed;
    text-decoration: line-through;
}

.flatpickr-day.flatpickr-disabled:hover {
    cursor: not-allowed;
}

.flatpickr-day.selected {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
}

.flatpickr-day.selected:hover {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

/* Style for appointment date input */
#appointment_date:invalid {
    border-color: #dc3545;
    background-color: #fff5f5;
}

#appointment_date:valid {
    border-color: #28a745;
}

/* Flatpickr input styling to match Bootstrap */
.flatpickr-input.form-control {
    background-color: #fff;
}

/* Time Select Styling - CRITICAL: Ensure dropdown works */
select#appointment_time {
    transition: none !important;
}

select#appointment_time:not(:disabled) {
    cursor: pointer !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    z-index: 10 !important;
    position: relative !important;
    user-select: auto !important;
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    visibility: visible !important;
    display: block !important;
    -webkit-appearance: menulist !important;
    -moz-appearance: menulist !important;
    appearance: menulist !important;
}

select#appointment_time:not(:disabled):focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
    outline: 0 !important;
}

select#appointment_time:not(:disabled):hover {
    border-color: #667eea !important;
    cursor: pointer !important;
}

select#appointment_time:not(:disabled):active {
    cursor: pointer !important;
}

select#appointment_time:disabled {
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
}

/* Ensure select options are visible and clickable */
select#appointment_time:not(:disabled) option {
    display: block !important;
    visibility: visible !important;
    padding: 8px !important;
    cursor: pointer !important;
}

/* Remove any pseudo-elements that might block interaction */
select#appointment_time:not(:disabled)::before,
select#appointment_time:not(:disabled)::after {
    display: none !important;
    pointer-events: none !important;
    content: none !important;
}

/* Force Bootstrap select to work properly */
select#appointment_time.form-select:not(:disabled) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.5rem !important;
}