/* Booking Services Plugin Frontend Styles */

/* Form Container */
.booking-form-container {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.6;
}

/* Form Header */
.booking-form-header {
    /* margin-bottom: 30px; */
    /* border-bottom: 2px solid #bdbdbd; */
    /* padding-bottom: 20px; */
}

.booking-form-header .form-title {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 28px;
    font-weight: 600;
}

.booking-form-header .form-description {
    margin: 0;
    color: #666;
    font-size: 16px;
}

/* Form Fields */
.form-field {
    margin-bottom: 25px;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #23282d;
    font-size: 14px;
}

.field-label .required {
    color: #d63638;
    margin-left: 2px;
}

/* Form Controls */
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.1);
}

/* Error States */
.form-control.error {
    border-color: #d63638;
    background-color: #ffeaea;
    box-shadow: 0 0 0 2px rgba(214, 54, 56, 0.1);
}

.form-control.success {
    border-color: #46b450;
    background-color: #f0f8ff;
    box-shadow: 0 0 0 2px rgba(70, 180, 80, 0.1);
}

/* Form Field States */
.form-field.has-error .field-label {
    color: #d63638;
}

.form-field.has-success .field-label {
    color: #46b450;
}

/* Textarea */
textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Select */
select.form-control {
    cursor: pointer;
}

/* Radio and Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 5px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

/* Field Error Messages */
.field-error {
    color: #d63638;
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: slideInDown 0.3s ease;
}

.field-error::before {
    content: "⚠";
    font-size: 14px;
    color: #d63638;
}

/* Validation Messages */
.validation-message {
    font-size: 12px;
    margin-top: 5px;
    padding: 6px 10px;
    border-radius: 3px;
    display: none;
    animation: slideInDown 0.3s ease;
}

.validation-message.show {
    display: block;
}

.validation-message.error {
    background: #ffeaea;
    color: #d63638;
    border: 1px solid #f0c6cb;
}

.validation-message.success {
    background: #f0f8ff;
    color: #46b450;
    border: 1px solid #c3e6cb;
}

/* Booking Messages */
.booking-message {
    padding: 15px 20px;
    margin: 0 0 25px 0;
    border-radius: 6px;
    font-weight: 500;
    position: relative;
    animation: slideInDown 0.4s ease;
}

.booking-message.error {
    background: #ffeaea;
    color: #721c24;
    border: 1px solid #f0c6cb;
    border-left: 4px solid #d63638;
}

.booking-message.success {
    background: #f0f8ff;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-left: 4px solid #46b450;
}

.booking-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #ffc107;
}

.booking-message::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-right: 8px;
}

.booking-message.error::before {
    content: "\f071"; /* exclamation-triangle */
}

.booking-message.success::before {
    content: "\f058"; /* check-circle */
}

.booking-message.warning::before {
    content: "\f071"; /* exclamation-triangle */
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Shake animation for form fields */
.form-field.shake {
    animation: shake 0.5s ease-in-out;
}

.form-field-wrapper.shake {
    animation: shake 0.5s ease-in-out;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    margin: 0;
    width: auto;
    cursor: pointer;
}

.radio-option label,
.checkbox-option label {
    margin: 0;
    cursor: pointer;
    font-weight: normal;
    color: #23282d;
}

/* File Input */
input[type="file"].form-control {
    padding: 8px 12px;
}

/* Field Description */
.field-description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Submit Button */
.submit-field {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.booking-submit-btn {
    background: #0073aa;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: background-color 0.2s;
    font-family: inherit;
}

.booking-submit-btn:hover {
    background: #005a87;
}

.booking-submit-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.3);
}

.booking-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Checkout Button */
.booking-checkout-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    padding: 15px 40px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: inherit;
    width: 100%;
    text-align: center;
}

.booking-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.booking-checkout-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}

/* Payment field styling */
.payment-field-container {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 10px 0;
    text-align: center;
}

.payment-summary {
    text-align: center;
}

.payment-amount {
    font-size: 24px;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 8px;
}

.payment-description {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

.form-payment-summary {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.payment-total {
    font-size: 20px;
}

/* Payment Modal */
.booking-payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.payment-modal-header {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.payment-modal-header h3 {
    margin: 0;
    color: #23282d;
    font-size: 20px;
}

.payment-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-modal-close:hover {
    color: #000;
}

.payment-modal-body {
    padding: 25px;
}

.payment-modal-body h4 {
    margin: 0 0 15px 0;
    color: #23282d;
    font-size: 16px;
}

.payment-summary {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.payment-summary .payment-amount {
    font-size: 24px;
    font-weight: 700;
    color: #28a745;
    margin: 0;
}

.payment-methods {
    margin-bottom: 20px;
}

.payment-method-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.payment-method-option:last-child {
    border-bottom: none;
}

.payment-method-option input[type="radio"] {
    margin: 0;
}

.payment-method-option label {
    font-weight: 500;
    cursor: pointer;
    color: #23282d;
    margin: 0;
}

.payment-method-option input:disabled + label {
    color: #999;
    cursor: not-allowed;
}

.payment-modal-footer {
    padding: 15px 25px 25px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.button-primary,
.button-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s;
}

.button-primary {
    background: #0073aa;
    color: #fff;
}

.button-primary:hover {
    background: #005a87;
}

.button-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.button-secondary {
    background: #f7f7f7;
    color: #23282d;
    border: 1px solid #ccd0d4;
}

.button-secondary:hover {
    background: #f1f1f1;
}

/* Loading State */
.booking-form-container.loading .booking-submit-btn {
    background: #ccc;
    cursor: wait;
}

.booking-form-container.loading .booking-submit-btn:after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Messages */
.booking-message {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 4px;
    font-weight: 500;
}

.booking-message.success {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.booking-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Validation Errors */
.form-field.has-error .form-control {
    border-color: #d63638;
    box-shadow: 0 0 0 1px rgba(214, 54, 56, 0.2);
}

.field-error {
    color: #d63638;
    font-size: 12px;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .booking-form-container {
        margin: 20px;
        padding: 20px;
    }
    
    .booking-form-header .form-title {
        font-size: 24px;
    }
    
    .radio-group,
    .checkbox-group {
        gap: 10px;
    }
    
    .booking-submit-btn {
        width: 100%;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .booking-form-container {
        margin: 10px;
        padding: 15px;
    }
    
    .booking-form-header {
        padding-bottom: 15px;
        margin-bottom: 20px;
    }
    
    .booking-form-header .form-title {
        font-size: 20px;
    }
    
    .form-field {
        margin-bottom: 20px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .booking-form-container {
        background: #1a1a1a;
        border-color: #333;
        color: #fff;
    }
    
    .booking-form-header {
        border-bottom-color: #d3d3d3;
    }
    
    .field-label {
        color: #fff;
    }
    
    .form-control {
        background: #2d2d2d;
        border-color: #444;
        color: #fff;
    }
    
    .form-control:focus {
        border-color: #0073aa;
        box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
    }
    
    .radio-option label,
    .checkbox-option label {
        color: #fff;
    }
    
    .field-description {
        color: #ccc;
    }
    
    .submit-field {
        border-top-color: #333;
    }
}