/**
 * QR Generator Mobile-Specific Enhancements
 * Optimizes the QR interface for thumb-friendly interaction
 */

@media (max-width: 768px) {
    
    /* ============================================
       MOBILE LAYOUT OPTIMIZATION
       ============================================ */
    
    /* Prioritize content over headers on mobile */
    .header {
        margin-bottom: 20px !important;
        padding-bottom: 15px !important;
    }
    
    .breadcrumb {
        margin-bottom: 10px !important;
        font-size: 0.8em !important;
    }
    
    /* Optimize main content flow */
    .main-content {
        gap: 25px !important;
    }
    
    /* Make text input more prominent on mobile */
    .input-section {
        margin-bottom: 25px;
    }
    
    .text-input {
        min-height: 100px !important;
        font-size: 16px !important; /* Prevent iOS zoom */
        border-radius: 12px !important;
        padding: 15px !important;
        border: 2px solid #333 !important;
        transition: border-color 0.3s ease;
    }
    
    .text-input:focus {
        border-color: #4ecdc4 !important;
        outline: none;
    }
    
    .character-counter {
        font-size: 0.9em !important;
        margin-top: 8px !important;
        text-align: right;
        color: #888;
    }
    
    /* ============================================
       MOBILE COLOR CONTROLS
       ============================================ */
    
    .color-controls {
        gap: 15px !important;
    }
    
    .control-group {
        background: #111;
        padding: 15px;
        border-radius: 12px;
        border: 1px solid #222;
    }
    
    .control-group label {
        font-size: 0.9em;
        color: #ccc;
        margin-bottom: 8px;
        display: block;
    }
    
    .color-input-group {
        display: flex;
        gap: 10px;
        align-items: center;
    }
    
    .color-input-group input[type="text"] {
        flex: 1;
        min-height: 44px !important;
        font-family: monospace;
        font-size: 14px !important;
        text-align: center;
        border-radius: 8px !important;
    }
    
    .color-input-group input[type="color"] {
        width: 44px !important;
        height: 44px !important;
        border-radius: 8px !important;
        border: 2px solid #333 !important;
        padding: 2px !important;
        cursor: pointer;
    }
    
    /* ============================================
       MOBILE LOGO UPLOAD
       ============================================ */
    
    .logo-upload-area {
        min-height: 100px !important;
        padding: 20px !important;
        border: 2px dashed #444 !important;
        border-radius: 12px !important;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        background: #0a0a0a;
    }
    
    .logo-upload-area:hover,
    .logo-upload-area:active {
        border-color: #4ecdc4 !important;
        background: rgba(78, 205, 196, 0.05);
    }
    
    .upload-icon {
        font-size: 2em;
        margin-bottom: 8px;
    }
    
    .upload-text {
        font-size: 1em;
        font-weight: 500;
        color: #fff;
        margin-bottom: 4px;
    }
    
    .upload-subtext {
        font-size: 0.8em;
        color: #888;
    }
    
    .logo-preview {
        background: #111 !important;
        padding: 15px !important;
        border-radius: 12px !important;
        border: 1px solid #222 !important;
        margin-top: 15px !important;
    }
    
    .logo-preview-image {
        max-width: 80px !important;
        max-height: 80px !important;
        border-radius: 8px;
    }
    
    .remove-logo-btn {
        background: #ff4444 !important;
        color: #fff !important;
        border: none !important;
        padding: 8px 16px !important;
        border-radius: 6px !important;
        font-size: 0.9em !important;
        margin-top: 10px !important;
        min-height: 36px !important;
    }
    
    /* ============================================
       MOBILE GENERATE BUTTON
       ============================================ */
    
    .generate-button {
        width: 100% !important;
        min-height: 56px !important;
        font-size: 1.1em !important;
        font-weight: 600 !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, #4ecdc4 0%, #44b3a8 100%) !important;
        color: #000 !important;
        border: none !important;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
    }
    
    .generate-button:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
    }
    
    .generate-button:active:not(:disabled) {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
    }
    
    .generate-button:disabled {
        background: #333 !important;
        color: #666 !important;
        cursor: not-allowed;
        box-shadow: none;
    }
    
    /* ============================================
       MOBILE QR DISPLAY
       ============================================ */
    
    .qr-display {
        background: #111 !important;
        border-radius: 12px !important;
        padding: 20px !important;
        border: 1px solid #222 !important;
        text-align: center;
        min-height: 200px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .qr-placeholder {
        text-align: center;
    }
    
    .placeholder-icon {
        font-size: 3em;
        margin-bottom: 10px;
        opacity: 0.5;
    }
    
    .placeholder-text {
        color: #888;
        font-size: 1em;
    }
    
    #qr-canvas {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 8px;
    }
    
    /* ============================================
       MOBILE EXPORT CONTROLS
       ============================================ */
    
    .export-section {
        background: #0a0a0a !important;
        padding: 20px !important;
        border-radius: 12px !important;
        border: 1px solid #222 !important;
        margin-top: 20px;
    }
    
    .format-buttons {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 15px;
    }
    
    .format-btn {
        min-height: 44px !important;
        padding: 10px 15px !important;
        font-size: 0.9em !important;
        border-radius: 8px !important;
        background: #222 !important;
        color: #ccc !important;
        border: 1px solid #333 !important;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .format-btn.active {
        background: #4ecdc4 !important;
        color: #000 !important;
        border-color: #4ecdc4 !important;
    }
    
    .format-btn:hover {
        background: #333 !important;
        border-color: #444 !important;
    }
    
    .format-btn.active:hover {
        background: #44b3a8 !important;
    }
    
    .download-btn {
        width: 100% !important;
        min-height: 50px !important;
        font-size: 1em !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: #fff !important;
        border: none !important;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .download-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    }
    
    /* ============================================
       MOBILE SECTION SPACING
       ============================================ */
    
    .section-title {
        font-size: 1.1em !important;
        margin-bottom: 12px !important;
        color: #fff !important;
        font-weight: 500;
    }
    
    .color-section,
    .logo-section,
    .generate-section {
        margin-bottom: 25px;
    }
    
    /* ============================================
       MOBILE STATUS MESSAGES
       ============================================ */
    
    .status-message {
        border-radius: 10px !important;
        padding: 12px 15px !important;
        font-size: 0.9em !important;
        margin-bottom: 20px !important;
    }
    
    /* ============================================
       MOBILE FOOTER
       ============================================ */
    
    footer {
        margin-top: 40px !important;
        padding-top: 20px !important;
        font-size: 0.8em !important;
        line-height: 1.5 !important;
    }
}