/**
 * Mobile UX Enhancements for QuadTask
 * Optimized for touch interactions and mobile viewports
 */

/* Mobile device detection class */
.mobile-device {
    /* Improve touch target sizes */
    touch-action: manipulation;
}

.mobile-device button {
    min-height: 44px; /* iOS recommended touch target */
    min-width: 44px;
}

.mobile-device input[type="checkbox"] {
    transform: scale(1.2);
}

/* Mobile-specific task item styling */
@media (max-width: 768px) {
    /* Larger touch targets for mobile */
    .task-item button {
        padding: 12px;
    }
    
    /* Better spacing for mobile */
    .task-item {
        padding: 16px;
    }
    
    /* Improved typography for mobile */
    .task-item h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .task-item p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    /* Status badges larger on mobile */
    .task-item .status-badge {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    /* Quick note form styling */
    .quick-note-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 12px;
    }
    
    .quick-note-form button {
        border-radius: 8px;
        font-weight: 600;
    }
    
    /* Dropdown menu improvements */
    .dropdown-menu {
        min-width: 200px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
    
    .dropdown-menu button {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    /* Toast notifications */
    #mobile-toast {
        max-width: 90vw;
        padding: 12px 20px;
        font-size: 0.95rem;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Keyboard open state adjustments */
.keyboard-open {
    /* Adjust layout when mobile keyboard is open */
    min-height: 100vh;
}

.keyboard-open .fixed-bottom {
    bottom: 0;
}

/* Dark mode mobile adjustments */
@media (max-width: 768px) and (prefers-color-scheme: dark) {
    .task-item {
        border-color: rgba(75, 85, 99, 0.3);
    }
    
    .quick-note-form textarea {
        background-color: rgba(31, 41, 55, 0.8);
        border-color: rgba(75, 85, 99, 0.5);
    }
    
    .dropdown-menu {
        background-color: rgba(31, 41, 55, 0.95);
        border-color: rgba(75, 85, 99, 0.3);
        backdrop-filter: blur(10px);
    }
}

/* Swipe gesture indicators (for future use) */
.swipe-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.swipe-indicator.left {
    left: 10px;
}

.swipe-indicator.right {
    right: 10px;
}

.task-item:hover .swipe-indicator {
    opacity: 0.3;
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    /* Larger focus indicators */
    button:focus,
    input:focus,
    textarea:focus {
        outline: 3px solid #3B82F6;
        outline-offset: 2px;
    }
    
    /* Better contrast for touch targets */
    button:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    /* Improved checkbox styling */
    input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }
}
