/**
 * Public Styles - Restaurant Booking Pro
 * Modern, responsive booking form
 *
 * @package RestaurantBookingPro
 * @since 1.0.0
 */

:root {
    --rbp-primary: #667eea;
    --rbp-secondary: #764ba2;
    --rbp-success: #10b981;
    --rbp-danger: #ef4444;
    --rbp-dark: #1f2937;
    --rbp-light: #f9fafb;
    --rbp-border: #e5e7eb;
    --rbp-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --rbp-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --rbp-radius: 8px;
    --rbp-transition: all 0.3s ease;
}

/* Booking Form Wrapper */
.rbp-booking-form-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.rbp-form-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: var(--rbp-dark);
    margin-bottom: 30px;
    background: linear-gradient(135deg, var(--rbp-primary), var(--rbp-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form */
.rbp-booking-form {
    background: white;
    padding: 40px;
    border-radius: var(--rbp-radius);
    box-shadow: var(--rbp-shadow-lg);
}

.rbp-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.rbp-form-group {
    margin-bottom: 20px;
}

.rbp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--rbp-dark);
    font-size: 14px;
}

.rbp-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--rbp-border);
    border-radius: var(--rbp-radius);
    font-size: 16px;
    transition: var(--rbp-transition);
    font-family: inherit;
}

.rbp-input:focus {
    outline: none;
    border-color: var(--rbp-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.rbp-input::placeholder {
    color: #9ca3af;
}

textarea.rbp-input {
    resize: vertical;
    min-height: 100px;
}

/* Submit Button */
.rbp-form-actions {
    margin-top: 30px;
}

.rbp-submit-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--rbp-primary), var(--rbp-secondary));
    color: white;
    border: none;
    border-radius: var(--rbp-radius);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--rbp-transition);
    box-shadow: var(--rbp-shadow);
}

.rbp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--rbp-shadow-lg);
}

.rbp-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.rbp-btn-loading {
    display: inline-block;
}

/* Messages */
.rbp-form-message {
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--rbp-radius);
    font-weight: 500;
    text-align: center;
}

.rbp-form-message.rbp-success {
    background: #d1fae5;
    color: #065f46;
    border: 2px solid var(--rbp-success);
}

.rbp-form-message.rbp-error {
    background: #fee2e2;
    color: #991b1b;
    border: 2px solid var(--rbp-danger);
}

/* Loading Spinner */
.rbp-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.rbp-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: rbp-spin 0.8s linear infinite;
}

@keyframes rbp-spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .rbp-booking-form {
        padding: 24px;
    }
    
    .rbp-form-row {
        grid-template-columns: 1fr;
    }
    
    .rbp-form-title {
        font-size: 24px;
    }
}

/* Accessibility */
.rbp-input:focus-visible {
    outline: 2px solid var(--rbp-primary);
    outline-offset: 2px;
}

/* Animations */
@keyframes rbp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rbp-booking-form {
    animation: rbp-fadeIn 0.5s ease-out;
}

/* Waitlist Section Styles */
.rbp-waitlist-section {
    background: #fef3c7;
    border: 2px solid #f59e0b;
    border-radius: var(--rbp-radius);
    padding: 20px;
    margin: 20px 0;
    animation: rbp-fadeIn 0.5s ease-out;
}

.rbp-waitlist-notice {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.rbp-waitlist-icon {
    font-size: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.rbp-waitlist-content h4 {
    color: #92400e;
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.rbp-waitlist-content p {
    color: #78350f;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.rbp-waitlist-details {
    margin-top: 15px;
}

.rbp-waitlist-stats {
    background: white;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.rbp-stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rbp-stat-item strong {
    color: #92400e;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rbp-stat-item span:not(strong) {
    color: #1f2937;
    font-size: 16px;
    font-weight: 600;
}

.rbp-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 15px 0;
    padding: 15px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    transition: var(--rbp-transition);
}

.rbp-checkbox-label:hover {
    border-color: var(--rbp-primary);
    background: #f8fafc;
}

.rbp-checkbox-label input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
    margin: 0 !important;
    accent-color: var(--rbp-primary);
}

.rbp-checkbox-text {
    color: var(--rbp-dark);
    font-weight: 500;
    flex: 1;
}

.rbp-form-help {
    display: block;
    margin-top: 5px;
    color: #6b7280;
    font-size: 13px;
    font-style: italic;
}

/* Waitlist time selection */
#rbp-waitlist-time {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin-top: 15px;
}

#rbp-waitlist-time label {
    color: var(--rbp-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .rbp-waitlist-notice {
        flex-direction: column;
        text-align: center;
    }
    
    .rbp-waitlist-icon {
        align-self: center;
        font-size: 32px;
    }
    
    .rbp-waitlist-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .rbp-stat-item {
        text-align: center;
    }
}

/* Success state for waitlist submission */
.rbp-waitlist-success {
    background: #d1fae5;
    border-color: var(--rbp-success);
    color: #065f46;
}

.rbp-waitlist-success .rbp-waitlist-content h4 {
    color: #065f46;
}

.rbp-waitlist-success .rbp-waitlist-content p {
    color: #047857;
}
