/**
 * Jewish Museum Booking System Styles
 */

/* Main Container */
.jmb-booking-container {
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Steps Navigation */
.jmb-steps-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    margin: 0;
}

.jmb-step {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 15px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666666;
    background: #f8f9fa;
}

.jmb-step:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background: #e0e0e0;
}

.jmb-step.active {
    background: #1c9ebd;
    color: white;
}

.jmb-step.completed {
    background: #28a745;
    color: white;
}

.jmb-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
    font-size: 14px;
    margin-right: 10px;
}

.jmb-step.active .jmb-step-number,
.jmb-step.completed .jmb-step-number {
    background: rgba(255, 255, 255, 0.3);
}

.jmb-step-title {
    font-weight: 500;
    font-size: 14px;
}

/* Loading State */
.jmb-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    background: #ffffff;
}

.jmb-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1c9ebd;
    border-radius: 50%;
    animation: jmb-spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes jmb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.jmb-loading p {
    color: #666666;
    font-size: 16px;
    margin: 0;
}

/* Iframe Wrapper */
.jmb-iframe-wrapper {
    position: relative;
    width: 100%;
    background: #ffffff;
}

.jmb-iframe {
    width: 100%;
    border: none;
    display: block;
    background: #ffffff;
    min-height: 600px;
}

/* Error State */
.jmb-error-container {
    padding: 40px 20px;
    text-align: center;
    background: #ffffff;
}

.jmb-error-message {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
}

.jmb-error-message h4 {
    color: #e53e3e;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.jmb-error-message p {
    color: #666666;
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.jmb-retry-btn {
    background: #1c9ebd;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.jmb-retry-btn:hover {
    background: #157a94;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jmb-booking-container {
        border-radius: 0;
        box-shadow: none;
    }
    
    .jmb-steps-nav {
        flex-wrap: wrap;
    }
    
    .jmb-step {
        flex: 1 1 50%;
        padding: 15px 10px;
    }
    
    .jmb-step-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
        margin-right: 8px;
    }
    
    .jmb-step-title {
        font-size: 12px;
    }
    
    .jmb-loading {
        padding: 40px 15px;
    }
    
    .jmb-error-container {
        padding: 30px 15px;
    }
    
    .jmb-error-message {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .jmb-step {
        flex-direction: column;
        padding: 12px 8px;
    }
    
    .jmb-step-number {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .jmb-step-title {
        text-align: center;
        font-size: 11px;
    }
}

/* WordPress Theme Compatibility */
.jmb-booking-container * {
    box-sizing: border-box;
}

.jmb-booking-container p,
.jmb-booking-container h1,
.jmb-booking-container h2,
.jmb-booking-container h3,
.jmb-booking-container h4,
.jmb-booking-container h5,
.jmb-booking-container h6 {
    margin: 0;
    padding: 0;
}

/* Animation for smooth transitions */
.jmb-iframe-wrapper,
.jmb-loading,
.jmb-error-container {
    transition: opacity 0.3s ease;
}

/* Success State Styling */
.jmb-step.completed .jmb-step-number::before {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
}

/* Hover Effects */
.jmb-step:not(.active):not(.completed):hover {
    background: #e9ecef;
}

/* Focus States for Accessibility */
.jmb-retry-btn:focus {
    outline: 2px solid #1c9ebd;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .jmb-booking-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .jmb-steps-nav {
        display: none;
    }
    
    .jmb-loading,
    .jmb-error-container {
        display: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .jmb-step {
        border: 2px solid transparent;
    }
    
    .jmb-step.active {
        border-color: #ffffff;
    }
    
    .jmb-step.completed {
        border-color: #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .jmb-spinner {
        animation: none;
    }
    
    .jmb-step,
    .jmb-iframe-wrapper,
    .jmb-loading,
    .jmb-error-container,
    .jmb-retry-btn {
        transition: none;
    }
}
