/* Eskag Booking System - Frontend Styles */

.eskag-booking-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 0 15px;
}

.eskag-booking-wrapper {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Steps */
.booking-step {
    display: none;
}

.booking-step.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.booking-step h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #2c3e50;
    font-size: 24px;
    border-bottom: 3px solid #4CAF50;
    padding-bottom: 15px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.2);
    background: #f9fff9;
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

small {
    display: block;
    color: #7f8c8d;
    margin-top: 5px;
    font-size: 12px;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Time Slots */
#time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.time-slot {
    padding: 12px 8px;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    background: white;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.time-slot:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.time-slot.available {
    border-color: #4CAF50;
    color: #2c3e50;
}

.time-slot.available:hover {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.time-slot.booked {
    background: #f5f5f5;
    color: #bbb;
    cursor: not-allowed;
    text-decoration: line-through;
    border-color: #ddd;
}

.time-slot.selected {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.time-slot:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Buttons */
.button {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #f0f0f0;
    color: #2c3e50;
    text-decoration: none;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
}

.button:hover {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.button-primary {
    background: #4CAF50;
    color: white;
}

.button-primary:hover {
    background: #45a049;
}

.button-secondary {
    background: #f0f0f0;
    color: #2c3e50;
    border: 1px solid #ddd;
}

.button-secondary:hover {
    background: #e0e0e0;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Existing Patient Section */
#existing-patient {
    margin: 20px 0;
    padding: 15px;
    background: #e8f5e9;
    border-left: 4px solid #4CAF50;
    border-radius: 4px;
}

#existing-patient p {
    margin: 10px 0;
    color: #2c3e50;
}

#existing-patient p:first-child {
    font-weight: 600;
}

/* Success Section */
#step3-success {
    text-align: center;
    padding: 40px 0;
}

#step3-success > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#step3-success h2 {
    border: none;
    padding: 0;
    margin-bottom: 20px;
    color: #4CAF50;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

#success-message {
    font-size: 16px;
    color: #2c3e50;
    margin: 20px 0;
    line-height: 1.6;
}

/* Button Group */
.button-group {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

.button-group .button {
    flex: 1;
    margin: 0;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #4CAF50;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 600px) {
    .eskag-booking-wrapper {
        padding: 20px;
    }
    
    .booking-step h2 {
        font-size: 20px;
    }
    
    .button {
        width: 100%;
        padding: 12px;
        margin-bottom: 10px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    #time-slots {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }
}

/* Accessibility */
.form-control:focus,
.button:focus {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

.time-slot:focus-visible {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}
