/* Chatbot Reservation Switcher Styles */

.crs-container {
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* No toggle mode - cleaner appearance */
.crs-container.crs-no-toggle {
    box-shadow: none;
    border-radius: 0;
    background: transparent;
}

/* Toggle Controls */
.crs-toggle-controls {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 0;
}

.crs-toggle-btn {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
    position: relative;
}

.crs-toggle-btn:hover {
    background: #e9ecef;
    color: #495057;
}

.crs-toggle-btn.active {
    background: #007cba;
    color: #ffffff;
}

.crs-toggle-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #005a87;
}

.crs-toggle-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: -2px;
}

/* Content Area */
.crs-content {
    position: relative;
    min-height: 400px;
}

.crs-mode-content {
    padding: 0;
    min-height: 400px;
}

/* Loading Spinner */
.crs-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
}

.crs-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: crs-spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

.crs-loading p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

/* Iframe Styles */
#crs-reservation-iframe {
    width: 100%;
    border: none;
    display: block;
    background: #ffffff;
}

/* Chatbot Container */
#crs-chatbot-script-container {
    min-height: 400px;
    padding: 20px;
    background: #ffffff;
}

/* Error Messages */
.crs-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    margin: 10px 20px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 14px;
}

/* No URL Messages */
.crs-mode-content p {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .crs-toggle-controls {
        flex-direction: column;
    }
    
    .crs-toggle-btn {
        border-bottom: 1px solid #e9ecef;
    }
    
    .crs-toggle-btn:last-child {
        border-bottom: none;
    }
    
    .crs-toggle-btn.active::after {
        height: 0;
        border-left: 3px solid #005a87;
        border-bottom: none;
        top: 0;
        bottom: 0;
        right: auto;
        width: 0;
    }
    
    .crs-content {
        min-height: 300px;
    }
    
    .crs-mode-content {
        min-height: 300px;
    }
    
    #crs-chatbot-script-container {
        min-height: 300px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .crs-toggle-btn {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .crs-content {
        min-height: 250px;
    }
    
    .crs-mode-content {
        min-height: 250px;
    }
    
    #crs-chatbot-script-container {
        min-height: 250px;
        padding: 10px;
    }
}

/* Accessibility Improvements */
.crs-toggle-btn:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .crs-container {
        border: 2px solid #000000;
    }
    
    .crs-toggle-btn {
        border: 1px solid #000000;
    }
    
    .crs-toggle-btn.active {
        background: #000000;
        color: #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .crs-toggle-btn,
    .crs-spinner {
        transition: none;
        animation: none;
    }
}

/* Print Styles */
@media print {
    .crs-toggle-controls {
        display: none;
    }
    
    .crs-loading {
        display: none;
    }
    
    .crs-container {
        box-shadow: none;
        border: 1px solid #000000;
    }
}
