/* Feedback Survey Styles - iPad Optimized */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--theme-color, #667eea) 0%, var(--theme-color-dark, #764ba2) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.container {
    width: 100%;
    max-width: 1000px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 60px 40px;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 12px;
    font-weight: 700;
}

.header p {
    font-size: 20px;
    color: #666;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    color: #666;
    font-size: 16px;
    margin-top: 10px;
}

/* Screens */
.screen {
    display: none;
    flex: 1;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

/* Language Selection */
.language-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.language-btn {
    padding: 40px 30px;
    font-size: 24px;
    font-weight: 600;
    border: 3px solid #ddd;
    border-radius: 16px;
    background: white;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.language-btn:hover,
.language-btn:active {
    transform: scale(0.98);
    border-color: #4CAF50;
    background: #f8f9fa;
}

/* Question Screen */
.question-title {
    font-size: 32px;
    color: #333;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
}

/* Options Grid */
.options-grid {
    display: grid;
    gap: 25px;
    flex: 1;
    align-content: start;
    padding-top: 20px;
}

.options-grid.emoji-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.options-grid.text-grid {
    grid-template-columns: 1fr;
}

/* Option Buttons */
.option-btn {
    padding: 40px 25px;
    border: 4px solid #ddd;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    touch-action: manipulation;
    font-size: 20px;
}

.option-btn .emoji {
    font-size: 70px;
    line-height: 1;
}

.option-btn .label {
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

.option-btn:hover,
.option-btn:active {
    transform: scale(0.98);
    border-color: #4CAF50;
    background: #f8f9fa;
}

.option-btn.selected {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.option-btn.text-only {
    padding: 25px 30px;
}

.option-btn.text-only .label {
    font-size: 20px;
}

/* Text Input */
.text-input-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.text-input {
    width: 100%;
    padding: 20px;
    font-size: 20px;
    border: 3px solid #ddd;
    border-radius: 12px;
    resize: vertical;
    min-height: 150px;
    font-family: inherit;
}

.text-input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Navigation Buttons */
.navigation {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.btn {
    flex: 1;
    padding: 20px 40px;
    font-size: 22px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover,
.btn-primary:active {
    background: #45a049;
    transform: scale(0.98);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover,
.btn-secondary:active {
    background: #e0e0e0;
    transform: scale(0.98);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Thank You Screen */
.thank-you-content {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.thank-you-icon {
    font-size: 120px;
    margin-bottom: 30px;
}

.thank-you-content h2 {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 20px;
}

.thank-you-content p {
    font-size: 24px;
    color: #666;
}

/* Loading Spinner */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.active {
    display: block;
}

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

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

/* QR Code - hide on mobile */
@media (max-width: 767px) {
    #qrCodeContainer {
        display: none !important;
    }
}

/* Responsive adjustments for mobile/tablet */
@media (max-width: 768px) {
    body {
        padding: 10px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }
    
    .container {
        padding: 30px 20px;
        min-height: auto;
        max-width: 100%;
    }
    
    .header h1 {
        font-size: 24px;
        line-height: 1.3;
    }
    
    .header p {
        font-size: 16px;
    }
    
    .question-title {
        font-size: 20px;
        margin-bottom: 25px;
    }
    
    /* Language buttons - smaller for mobile */
    .language-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 15px;
    }
    
    .language-btn {
        padding: 18px 20px;
        font-size: 16px;
    }
    
    /* Option buttons - smaller and better spacing */
    .options-grid {
        gap: 12px;
    }
    
    .options-grid.emoji-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .option-btn {
        padding: 20px 15px;
        font-size: 14px;
    }
    
    .option-btn .emoji {
        font-size: 36px;
    }
    
    .option-btn .label {
        font-size: 14px;
    }
    
    .option-btn.text-only {
        padding: 18px 20px;
    }
    
    .option-btn.text-only .label {
        font-size: 16px;
    }
    
    /* Text input */
    .text-input {
        padding: 15px;
        font-size: 16px;
        min-height: 120px;
    }
    
    /* Navigation buttons */
    .navigation {
        gap: 10px;
        margin-top: 25px;
        flex-direction: column;
    }
    
    .btn {
        padding: 15px 25px;
        font-size: 16px;
        width: 100%;
    }
    
    /* Thank you screen */
    .thank-you-icon {
        font-size: 80px;
        margin-bottom: 20px;
    }
    
    .thank-you-content h2 {
        font-size: 32px;
    }
    
    .thank-you-content p {
        font-size: 18px;
    }
    
    /* Progress bar */
    .progress-container {
        margin-bottom: 25px;
    }
    
    .progress-text {
        font-size: 14px;
    }
}

/* Extra small devices (phones < 480px) */
@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
        border-radius: 16px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .header p {
        font-size: 14px;
    }
    
    .question-title {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .language-btn {
        padding: 20px 15px;
        font-size: 16px;
    }
    
    .options-grid.emoji-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 10px;
    }
    
    .option-btn {
        padding: 15px 10px;
    }
    
    .option-btn .emoji {
        font-size: 32px;
    }
    
    .option-btn .label {
        font-size: 12px;
    }
    
    .option-btn.text-only .label {
        font-size: 14px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .thank-you-icon {
        font-size: 60px;
    }
    
    .thank-you-content h2 {
        font-size: 24px;
    }
    
    .thank-you-content p {
        font-size: 16px;
    }
}
