
/* WP Appointment Scheduler - Public Styles */

/* Fix notes field visibility */
#wp-appt-notes {
    color: #333 !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    padding: 10px !important;
}

/* Fix email button contrast */
.button {
    background-color: #006699 !important;
    color: #ffffff !important;
    font-weight: bold !important;
    text-decoration: none !important;
}

.button:hover {
    background-color: #004d73 !important;
    color: #ffffff !important;
}


.wp-appt-booking-form {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wp-appt-form-header {
    background: linear-gradient(135deg, #006699 0%, #003366 100%);
    color: #ffffff;
    padding: 30px;
    text-align: center;
}

.wp-appt-form-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wp-appt-form {
    padding: 40px;
}

.wp-appt-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.wp-appt-form-row:last-child {
    margin-bottom: 0;
}

.wp-appt-form-group {
    flex: 1;
}

.wp-appt-form-group.wp-appt-half {
    flex: 0 0 calc(50% - 10px);
}

.wp-appt-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333 !important;
    font-size: 14px;
}

.wp-appt-form-group input,
.wp-appt-form-group select,
.wp-appt-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    color: #333 !important;
    background-color: #ffffff;
    box-sizing: border-box;
}

.wp-appt-form-group input:focus,
.wp-appt-form-group select:focus,
.wp-appt-form-group textarea:focus {
    outline: none;
    border-color: #006699;
    box-shadow: 0 0 0 3px rgba(0, 102, 153, 0.1);
}

.wp-appt-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Time Slots */
.wp-appt-time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.wp-appt-time-slot {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #003366;
}

.wp-appt-time-slot:hover {
    background: #e8f4f8;
    border-color: #006699;
    transform: translateY(-1px);
}

.wp-appt-time-slot.selected {
    background: #006699;
    border-color: #006699;
    color: #ffffff;
}

.wp-appt-time-slot:disabled {
    background: #f5f5f5;
    border-color: #ddd;
    color: #999;
    cursor: not-allowed;
}

/* Submit Button */
.wp-appt-submit-btn {
    background: linear-gradient(135deg, #006699 0%, #003366 100%);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.wp-appt-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 102, 153, 0.3);
}

.wp-appt-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.wp-appt-btn-loading {
    display: inline-block;
}

/* Messages */
.wp-appt-message {
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 6px;
    font-weight: 500;
}

.wp-appt-message.wp-appt-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.wp-appt-message.wp-appt-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Status Messages */
.wp-appt-loading,
.wp-appt-select-date-first,
.wp-appt-no-slots,
.wp-appt-error {
    text-align: center;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.wp-appt-loading {
    color: #006699;
}

.wp-appt-error {
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-appt-booking-form {
        margin: 0 10px;
        border-radius: 0;
    }
    
    .wp-appt-form {
        padding: 20px;
    }
    
    .wp-appt-form-header {
        padding: 20px;
    }
    
    .wp-appt-form-header h2 {
        font-size: 24px;
    }
    
    .wp-appt-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .wp-appt-form-group.wp-appt-half {
        flex: 1;
    }
    
    .wp-appt-time-slots {
        justify-content: center;
    }
    
    .wp-appt-time-slot {
        flex: 0 0 calc(50% - 5px);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .wp-appt-time-slot {
        flex: 0 0 100%;
    }
}

/* Loading Animation */
@keyframes wp-appt-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.wp-appt-btn-loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: wp-appt-spin 1s linear infinite;
}

/* Form Validation */
.wp-appt-form-group input:invalid,
.wp-appt-form-group select:invalid {
    border-color: #dc3545;
}

.wp-appt-form-group input:valid,
.wp-appt-form-group select:valid {
    border-color: #28a745;
}

/* Accessibility */
.wp-appt-form-group input:focus,
.wp-appt-form-group select:focus,
.wp-appt-form-group textarea:focus,
.wp-appt-time-slot:focus,
.wp-appt-submit-btn:focus {
    outline: 2px solid #006699;
    outline-offset: 2px;
}

/* Dropdown option visibility fix */
.wp-appt-form-group select option {
    background-color: #ffffff;
    color: #333333;
    padding: 8px 12px;
}

.wp-appt-form-group select option:hover,
.wp-appt-form-group select option:focus {
    background-color: #006699;
    color: #ffffff;
}

/* Ensure dropdown text is visible */
.wp-appt-form-group select {
    color: #333333;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .wp-appt-booking-form {
        border: 2px solid #000;
    }
    
    .wp-appt-form-group input,
    .wp-appt-form-group select,
    .wp-appt-form-group textarea {
        border-color: #000;
    }
    
    .wp-appt-time-slot {
        border-color: #000;
    }
    
    .wp-appt-form-group select option {
        background-color: #ffffff;
        color: #000000;
    }
}

/* Date input specific styling */
.wp-appt-form-group input[type="date"] {
    color: #333333 !important;
    background-color: #ffffff !important;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.wp-appt-form-group input[type="date"]::-webkit-calendar-picker-indicator {
    color: #006699;
    background-color: transparent;
    cursor: pointer;
}

.wp-appt-form-group input[type="date"]::-webkit-datetime-edit {
    color: #333333;
}

.wp-appt-form-group input[type="date"]::-webkit-datetime-edit-fields-wrapper {
    color: #333333;
}

.wp-appt-form-group input[type="date"]::-webkit-datetime-edit-text {
    color: #333333;
}

.wp-appt-form-group input[type="date"]::-webkit-datetime-edit-month-field {
    color: #333333;
}

.wp-appt-form-group input[type="date"]::-webkit-datetime-edit-day-field {
    color: #333333;
}

.wp-appt-form-group input[type="date"]::-webkit-datetime-edit-year-field {
    color: #333333;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .wp-appt-form-group input,
    .wp-appt-form-group select,
    .wp-appt-form-group textarea,
    .wp-appt-time-slot,
    .wp-appt-submit-btn {
        transition: none;
    }
    
    .wp-appt-submit-btn:hover:not(:disabled) {
        transform: none;
    }
    
    .wp-appt-btn-loading::after {
        animation: none;
    }
}
