/**
 * Touch-specific styles
 * These styles are applied only to touch devices for better usability
 */

/* Apply these styles only to touch devices */
.touch-device {
    /* Increase touch targets */
    --min-touch-target: 44px;
}

/* Larger touch targets for interactive elements */
.touch-device .btn,
.touch-device .nav-link,
.touch-device select,
.touch-device input[type="checkbox"],
.touch-device input[type="radio"],
.touch-device .form-control {
    min-height: var(--min-touch-target);
    min-width: var(--min-touch-target);
}

/* Improved form controls for touch */
.touch-device .form-control {
    padding: var(--space-3);
    font-size: 16px; /* Prevents iOS zoom on focus */
}

/* Prevent double-tap zoom on iOS */
.touch-device a {
    touch-action: manipulation;
}

/* Improved button styles for touch */
.touch-device .btn {
    padding: var(--space-3) var(--space-5);
}

/* Improved select styles for touch */
.touch-device select {
    padding: var(--space-3) var(--space-5);
    background-size: 12px;
    background-position: calc(100% - 12px) center;
}

/* Improved calendar for touch */
.touch-device .calendar-day {
    min-height: var(--min-touch-target);
    min-width: var(--min-touch-target);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Improved gallery navigation for touch */
.touch-device .gallery-nav {
    min-height: var(--min-touch-target);
    min-width: var(--min-touch-target);
    opacity: 0.8;
    background-color: rgba(0, 0, 0, 0.3);
}

/* Improved scrolling */
.touch-device {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Disable hover effects that can cause issues on touch devices */
.touch-device .nav-link:hover::after {
    transform: scaleX(0);
}

.touch-device .nav-link.active::after {
    transform: scaleX(1);
}

/* Active states for touch */
.touch-device .btn:active,
.touch-device .nav-link:active,
.touch-device .form-control:active {
    opacity: 0.7;
}

/* Improved focus styles for touch */
.touch-device .form-control:focus,
.touch-device .btn:focus,
.touch-device a:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Input focused state */
.touch-device .input-focused {
    background-color: rgba(100, 161, 189, 0.05);
    border-radius: var(--radius-md);
}

/* Improved table interaction on touch */
.touch-device .responsive-table {
    -webkit-overflow-scrolling: touch;
}

/* Improved scrollbars for touch */
.touch-device ::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.touch-device ::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: 4px;
}

.touch-device ::-webkit-scrollbar-track {
    background: var(--color-gray-200);
}

/* Prevent pull-to-refresh on mobile browsers */
.touch-device {
    overscroll-behavior-y: contain;
}

/* Improved date picker for touch */
.touch-device input[type="date"] {
    min-height: var(--min-touch-target);
    padding: var(--space-3);
}

/* Improved checkbox and radio for touch */
.touch-device input[type="checkbox"],
.touch-device input[type="radio"] {
    transform: scale(1.2);
    margin-right: var(--space-3);
}

/* Improved dropdown menus for touch */
.touch-device .dropdown-menu {
    padding: var(--space-2) 0;
}

.touch-device .dropdown-item {
    padding: var(--space-3) var(--space-4);
    min-height: var(--min-touch-target);
} 