/**
 * Mobile-specific enhancements
 */

/* Better touch targets for mobile */
@media (max-width: 768px) {
    /* Larger input fields on mobile */
    .form-control {
        font-size: 16px !important; /* Prevent zoom on iOS */
        min-height: 50px;
        padding: 12px 16px;
    }
    
    /* Larger buttons */
    .btn-lg {
        min-height: 50px;
        font-size: 18px;
        padding: 14px 24px;
    }
    
    /* Better spacing */
    #importForm {
        padding: 20px;
    }
    
    /* Prevent double-tap zoom */
    * {
        touch-action: manipulation;
    }
    
    /* Loading state for button */
    .btn[disabled] {
        opacity: 0.7;
        cursor: not-allowed;
    }
    
    /* Mobile toast positioning */
    .mobile-toast {
        bottom: 80px !important; /* Above mobile keyboard */
        width: calc(100% - 40px) !important;
        max-width: 400px;
        left: 20px !important;
        right: 20px !important;
        transform: none !important;
        margin: 0 auto;
    }
    
    /* Better focus states */
    .form-control:focus {
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    }
    
    /* Validation feedback */
    .form-control.is-invalid {
        border-color: #dc3545;
        background-image: none;
    }
    
    .form-control.is-valid {
        border-color: #28a745;
        background-image: none;
    }
    
    /* Spinner animation */
    .spinner {
        display: inline-block;
        width: 16px;
        height: 16px;
        border: 2px solid #ffffff;
        border-radius: 50%;
        border-top-color: transparent;
        animation: spin 0.8s linear infinite;
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS only */
    .form-control {
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    /* Prevent iOS zoom on input focus */
    input[type="text"],
    input[type="url"],
    input[type="email"],
    input[type="tel"],
    textarea {
        font-size: 16px !important;
    }
}

/* Android-specific fixes */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    .btn {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}