/* ========================================
   APPOINTMENT FORM - ELEGANT DESIGN
   ======================================== */

/* Override any conflicting styles */
#appointmentFormContainer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

.appointment-form-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    animation: fadeInUp 0.6s ease-out;
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
}

.appointment-form-wrapper {
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.95) 0%, rgba(20, 20, 20, 0.95) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.8),
        0 0 0 1px rgba(212, 175, 55, 0.1) inset,
        0 0 100px rgba(212, 175, 55, 0.15);
    backdrop-filter: blur(20px);
    display: block !important;
}

.appointment-form-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    animation: rotateGlow 15s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.appointment-form {
    position: relative;
    z-index: 2;
    display: block !important;
    width: 100%;
    height: auto !important;
    overflow: visible !important;
}

/* Form Sections - Override styles.css */
#appointmentForm .form-section,
.appointment-form .form-section {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(212, 175, 55, 0.15) !important;
    border-radius: 16px !important;
    padding: 2rem !important;
    margin-bottom: 1.5rem !important;
    transition: all 0.3s ease;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative;
    z-index: 1;
    visibility: visible !important;
    opacity: 1 !important;
    border-bottom: none !important;
}

#appointmentForm .form-section::after,
.appointment-form .form-section::after {
    display: none !important;
}

.form-section:hover {
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
}

.form-section:last-of-type {
    margin-bottom: 0 !important;
}

#appointmentForm .form-section-title,
.appointment-form .form-section-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #d4af37 !important;
    margin-bottom: 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
    position: relative !important;
}

#appointmentForm .form-section-title::after,
.appointment-form .form-section-title::after {
    display: none !important;
}

.form-icon {
    font-size: 1.75rem;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
    display: inline-block;
}

/* Form Grid */
#appointmentForm .form-row,
.appointment-form .form-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
    width: 100%;
}

#appointmentForm .form-group,
.appointment-form .form-group {
    display: flex !important;
    flex-direction: column;
    width: 100%;
}

#appointmentForm .form-group label,
.appointment-form .form-group label {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: rgba(212, 175, 55, 0.9) !important;
    margin-bottom: 0.5rem !important;
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
}

#appointmentForm .form-group input,
#appointmentForm .form-group select,
#appointmentForm .form-group textarea,
.appointment-form .form-group input,
.appointment-form .form-group select,
.appointment-form .form-group textarea {
    width: 100% !important;
    padding: 0.875rem 1rem !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 2px solid rgba(212, 175, 55, 0.2) !important;
    border-radius: 12px !important;
    color: #fff !important;
    font-size: 1rem !important;
    transition: all 0.3s ease;
    font-family: inherit !important;
    display: block !important;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    background: rgba(0, 0, 0, 0.5);
}

.form-group input::placeholder {
    color: rgba(212, 175, 55, 0.4);
}

.form-hint {
    font-size: 0.85rem;
    color: rgba(212, 175, 55, 0.6);
    margin-top: 0.5rem;
    display: block;
}

.tolerance-warning {
    font-size: 0.85rem;
    color: rgba(255, 193, 7, 0.9);
    margin-top: 0.5rem;
    display: block;
    font-weight: 500;
}

/* Services Grid */
.services-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    width: 100%;
    margin: 0;
}

.service-option {
    cursor: pointer;
    position: relative;
    display: block !important;
}

.service-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.service-card {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.service-option:hover .service-card {
    border-color: rgba(212, 175, 55, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.2);
}

.service-option input[type="checkbox"]:checked + .service-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
}

.service-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.3));
}

.service-name {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
}

.service-option input[type="checkbox"]:checked + .service-card .service-name {
    color: #d4af37;
}

/* Professional Picker */
.professional-picker-btn {
    width: 100%;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    color: #fff;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.professional-picker-btn:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: rgba(0, 0, 0, 0.5);
}

.professional-display {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.professional-label {
    font-size: 0.85rem;
    color: rgba(212, 175, 55, 0.6);
}

.professional-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #d4af37;
}

/* Time Grid */
.time-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    width: 100%;
    min-height: 50px;
}

.time-grid p {
    grid-column: 1 / -1;
    margin: 0;
}

.time-slot {
    padding: 0.875rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 10px;
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block !important;
    font-family: inherit;
}

.time-slot.occupied {
    display: none !important;
}

.time-slot:hover:not(:disabled) {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.1);
    transform: translateY(-2px);
}

.time-slot.selected {
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #0a0a0a;
    border-color: #d4af37;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.time-slot:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(100, 100, 100, 0.2);
    border-color: rgba(100, 100, 100, 0.3);
}

/* Submit Button */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.btn-submit {
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
    color: #0a0a0a;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 10px 30px rgba(212, 175, 55, 0.4),
        0 0 0 2px rgba(212, 175, 55, 0.2) inset;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(212, 175, 55, 0.6),
        0 0 0 3px rgba(212, 175, 55, 0.3) inset,
        0 0 60px rgba(212, 175, 55, 0.3);
}

.btn-submit:active {
    transform: translateY(-1px) scale(1);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Status Messages */
.form-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
}

.form-status.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.5);
    color: #4caf50;
}

.form-status.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.5);
    color: #f44336;
}

.form-status.loading {
    background: rgba(212, 175, 55, 0.2);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #d4af37;
}

/* ===== ANIMATION ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MOBILE RESPONSIVE ===== */
@media (max-width: 767px) {
    .appointment-form-wrapper {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }
    
    .form-section {
        padding: 1.5rem 1rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }
    
    .form-section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .form-icon {
        font-size: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .service-card {
        padding: 1.25rem 1rem;
    }
    
    .time-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.5rem;
    }
    
    .time-slot {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn-submit {
        width: 100%;
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 479px) {
    .appointment-form-wrapper {
        padding: 1.25rem 0.875rem;
    }
    
    .form-section {
        padding: 1.25rem 0.875rem;
    }
    
    .form-section-title {
        font-size: 1.1rem;
    }
    
    .services-grid {
        gap: 0.5rem;
    }
    
    .service-card {
        padding: 1rem 0.75rem;
    }
    
    .time-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
