/*
 * SAEC Opticien - Frontend Appointment Booking Styles
 */

.saec-appointment-booking {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.saec-appointment-header {
    text-align: center;
    margin-bottom: 30px;
}

.saec-appointment-header h2 {
    font-size: 28px;
    color: #1a1a1a;
    margin: 0 0 10px;
}

.saec-appointment-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Steps */
.saec-appointment-steps {
    position: relative;
}

.saec-appointment-step {
    display: none;
    animation: fadeIn 0.3s ease;
}

.saec-appointment-step.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.saec-step-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.saec-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
}

.saec-step-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1a1a1a;
}

/* Categories Grid */
.saec-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.saec-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.saec-category-card:hover {
    border-color: #667eea;
    background: #f0f0ff;
    transform: translateY(-2px);
}

.saec-category-card input[type="radio"] {
    display: none;
}

.saec-category-card input[type="radio"]:checked + .saec-category-icon,
.saec-category-card input[type="radio"]:checked ~ .saec-category-label {
    color: #667eea;
}

.saec-category-card:has(input:checked) {
    border-color: #667eea;
    background: #f0f0ff;
}

.saec-category-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.saec-category-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Date & Time Picker */
.saec-datetime-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 600px) {
    .saec-datetime-grid {
        grid-template-columns: 1fr;
    }
}

.saec-date-picker label,
.saec-time-picker label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

#saec-appointment-date {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

#saec-appointment-date:focus {
    outline: none;
    border-color: #667eea;
}

.saec-time-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.saec-time-slot {
    padding: 12px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.saec-time-slot:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

.saec-time-slot.selected {
    border-color: #667eea;
    background: #667eea;
    color: #fff;
}

.saec-time-slot.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f0f0f0;
}

.saec-select-date-first {
    color: #999;
    text-align: center;
    grid-column: 1 / -1;
    padding: 20px;
}

/* Form Grid */
.saec-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

@media (max-width: 600px) {
    .saec-form-grid {
        grid-template-columns: 1fr;
    }
}

.saec-form-field {
    display: flex;
    flex-direction: column;
}

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

.saec-form-field label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.saec-form-field input[type="text"],
.saec-form-field input[type="tel"],
.saec-form-field input[type="email"],
.saec-form-field textarea {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.saec-form-field input:focus,
.saec-form-field textarea:focus {
    outline: none;
    border-color: #667eea;
}

.saec-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.saec-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
}

/* Buttons */
.saec-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 25px;
}

.saec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.saec-btn-next,
.saec-btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    margin-left: auto;
}

.saec-btn-next:hover,
.saec-btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.saec-btn-next:disabled,
.saec-btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.saec-btn-prev {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.saec-btn-prev:hover {
    background: #e9ecef;
}

.saec-btn-google-calendar {
    background: #4285f4;
    color: #fff;
    margin-right: 10px;
}

.saec-btn-google-calendar:hover {
    background: #357abd;
}

.saec-btn-ics {
    background: #28a745;
    color: #fff;
}

.saec-btn-ics:hover {
    background: #218838;
}

/* Success */
.saec-success {
    text-align: center;
    padding: 40px 20px;
}

.saec-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.saec-success h3 {
    font-size: 24px;
    color: #1a1a1a;
    margin: 0 0 15px;
}

.saec-success p {
    color: #666;
    font-size: 16px;
    margin: 0 0 25px;
}

.saec-appointment-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    text-align: left;
}

.saec-calendar-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Store Info */
.saec-store-info {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
}

.saec-store-info h4 {
    font-size: 18px;
    color: #1a1a1a;
    margin: 0 0 15px;
}

.saec-store-info p {
    color: #666;
    font-size: 14px;
    margin: 8px 0;
}

.saec-store-info a {
    color: #667eea;
    text-decoration: none;
}

.saec-store-info a:hover {
    text-decoration: underline;
}

/* Loading */
.saec-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 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
