/**
 * Jitsi Kiosk Extension Styles
 * Responsive CSS for department/location selection interface
 * 
 *  * Version: 3.4.0
 */

/* ========================================
   Base Styles & CSS Reset
   ======================================== */

.cx-kiosk-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.cx-kiosk-container * {
    box-sizing: border-box;
}

/* ========================================
   Layout Components
   ======================================== */

.cx-kiosk-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cx-kiosk-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.cx-kiosk-header .cx-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

.cx-kiosk-info {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 1rem;
    backdrop-filter: blur(10px);
}

.cx-kiosk-info.cx-loading {
    background-color: rgba(255, 255, 255, 0.1);
    animation: pulse 2s infinite;
}

/* ========================================
   Main Content Area
   ======================================== */

.cx-kiosk-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.cx-selection-container {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.cx-selection-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
}

.cx-selection-description {
    font-size: 1.1rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   Button Grid Layouts
   ======================================== */

.cx-button-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Grid responsive layouts */
.cx-button-grid.cx-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.cx-button-grid.cx-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.cx-button-grid.cx-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ========================================
   Primary Action Buttons (Minimal - Elementor handles styling)
   ======================================== */

.dept-btn,
.loc-btn,
.start-call-btn {
    cursor: pointer;
}

/* ========================================
   Button States & Animations (Functional only)
   ======================================== */

/* Selection animation - minimal visual feedback */
.cx-selecting {
    animation: selecting 0.3s ease-out;
}

.cx-selected {
    animation: selected-pulse 0.5s ease-out;
}

@keyframes selecting {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

@keyframes selected-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Pulse animation for loading states */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* ========================================
   Button Icons & Content (Removed - Elementor handles content)
   ======================================== */

/* All button content styling removed - handled by Elementor */

/* ========================================
   Navigation Buttons (Minimal - Elementor handles styling)
   ======================================== */

.back-btn {
    cursor: pointer;
}

/* ========================================
   Selected Department Display
   ======================================== */

.cx-department-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    display: none;
}

.cx-selected-department {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* ========================================
   Error & Status Messages
   ======================================== */

.cx-error-message {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    color: #721c24;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
}

.cx-success-message {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #155724;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 500;
}

/* ========================================
   Loading States
   ======================================== */

.cx-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.cx-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet Styles */
@media (max-width: 768px) {
    .cx-kiosk-header {
        padding: 1.5rem 1rem;
    }
    
    .cx-kiosk-header h1 {
        font-size: 2rem;
    }
    
    .cx-kiosk-content {
        padding: 2rem 1rem;
    }
    
    .cx-selection-container {
        padding: 2rem 1.5rem;
    }
    
    .cx-selection-title {
        font-size: 1.7rem;
    }
}

/* Mobile Styles */
@media (max-width: 480px) {
    .cx-kiosk-header {
        padding: 1rem;
    }
    
    .cx-kiosk-header h1 {
        font-size: 1.7rem;
    }
    
    .cx-kiosk-header .cx-subtitle {
        font-size: 1rem;
    }
    
    .cx-kiosk-content {
        padding: 1.5rem 0.75rem;
    }
    
    .cx-selection-container {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }
    
    .cx-selection-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .cx-selection-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .cx-button-grid {
        gap: 1rem;
    }
    
    .cx-button-grid.cx-grid-2,
    .cx-button-grid.cx-grid-3,
    .cx-button-grid.cx-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Kiosk-Specific Enhancements
   ======================================== */

/* Large touchscreen optimizations */
@media (min-width: 1200px) {
    .cx-kiosk-header h1 {
        font-size: 3rem;
    }
    
    .cx-selection-container {
        padding: 4rem;
    }
    
    .cx-selection-title {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }
}

/* ========================================
   Accessibility Features
   ======================================== */

/* Focus states for keyboard navigation */
.dept-btn:focus,
.loc-btn:focus,
.start-call-btn:focus,
.back-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cx-selecting,
    .cx-loading-spinner,
    .pulse {
        animation: none;
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    .cx-kiosk-container {
        background: white;
        color: black;
    }
}