/* ==========================================================================
   Cleaning Booking Plugin - Public Styles
   ========================================================================== */

/* Reset and Base Styles */
.cleaning-booking-form * {
    box-sizing: border-box;
}

/* Form Container */
.cleaning-booking-form {
    max-width: 780px !important;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cleaning-booking-form h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
    text-align: center;
}

/* Form Steps */
.booking-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0;
    list-style: none;
}

.booking-steps li {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 10px;
    color: #999;
    font-size: 14px;
    font-weight: 600;
}

.booking-steps li.active {
    color: #0073aa;
}

.booking-steps li.completed {
    color: #46b450;
}

.booking-steps li:not(:last-child):after {
    content: '→';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ddd;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.form-group.required label:after {
    content: ' *';
    color: #dc3232;
}

/* Service Selection */
.service-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.service-option {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.service-option:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.service-option.selected {
    border-color: #0073aa;
    background: #e3f2fd;
}

.service-option input[type="radio"] {
    display: none;
}

.service-option h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 18px;
}

.service-option p {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 14px;
}

.service-option .price {
    font-weight: 600;
    color: #0073aa;
    font-size: 16px;
}

/* Date and Time Selection */
.date-time-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.time-slot {
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.time-slot:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.time-slot.selected {
    border-color: #0073aa;
    background: #e3f2fd;
    color: #0073aa;
}

.time-slot.unavailable {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
    opacity: 0.6;
}

.time-slot input[type="radio"] {
    display: none;
}

/* Additional Services */
.additional-services {
    margin-top: 20px;
}

.additional-service {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #fafafa;
}

.additional-service input[type="checkbox"] {
    margin-right: 10px;
    width: auto;
}

.additional-service label {
    margin: 0;
    flex-grow: 1;
    cursor: pointer;
}

.additional-service .price {
    font-weight: 600;
    color: #0073aa;
}

/* Price Summary */
.price-summary {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.price-summary h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
}

.price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #666;
}

.price-total {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #dee2e6;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: #0073aa;
    color: white;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Messages */
.booking-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

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

.booking-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cleaning-booking-form {
        max-width: 90% !important;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .cleaning-booking-form {
        padding: 15px;
        margin: 0 10px;
    }
    
    .date-time-container {
        grid-template-columns: 1fr;
    }
    
    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-options {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cleaning-booking-form h3 {
        font-size: 20px;
    }
    
    .booking-steps {
        flex-direction: column;
        gap: 10px;
    }
    
    .booking-steps li:not(:last-child):after {
        display: none;
    }
    
    .time-slots {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states for better accessibility */
.service-option:focus,
.time-slot:focus,
.additional-service:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-option,
    .time-slot,
    .additional-service {
        border-width: 3px;
    }
    
    .service-option.selected,
    .time-slot.selected {
        background: #000;
        color: #fff;
    }
}

/* Service selection validation error styling */
.service-options-grid.validation-error {
    border: 2px solid #ff4444 !important;
    background-color: rgba(255, 68, 68, 0.1) !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Enhanced button styling for debugging */
#continue-to-booking {
    position: relative;
    min-height: 44px;
    transition: all 0.3s ease;
}

#continue-to-booking:hover {
    background-color: #0056b3 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#continue-to-booking:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#continue-to-booking:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Service selection message styling */
.service-selection-messages {
    margin: 1rem 0;
    padding: 0;
}

.service-selection-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 8px 0;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

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

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

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

/* Debug mode styling */
.debug-mode {
    position: fixed;
    top: 10px;
    right: 10px;
    background: #000;
    color: #0f0;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    z-index: 9999;
    max-width: 300px;
    max-height: 200px;
    overflow-y: auto;
}

/* Button loading state improvements */
.btn-text {
    transition: opacity 0.3s ease;
}

.btn-loading,
.btn-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Service option card enhancements */
.service-option-card {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-option-card:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.2);
}

.service-option-card.selected {
    border-color: #007cba;
    background-color: rgba(0, 124, 186, 0.1);
}

.service-option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-option-card input[type="radio"]:checked + .service-card-content {
    background-color: rgba(0, 124, 186, 0.1);
}

/* Responsive improvements */
@media (max-width: 768px) {
    #continue-to-booking {
        width: 100%;
        padding: 16px;
        font-size: 16px;
    }
    
    .service-options-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .debug-mode {
        position: relative;
        top: auto;
        right: auto;
        margin: 10px;
        max-width: none;
    }
} 