/* AveForms - Zebra Android terminal optimized styles */

:root {
    --ave-primary: #0d6efd;
    --ave-dark: #1a1a2e;
    --ave-touch-min: 48px;
    --ave-font-base: 16px;
}

* {
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: var(--ave-font-base);
}

body {
    background-color: #f4f6f9;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Login page */
.login-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border: none;
    border-radius: 12px;
}

/* Touch-friendly controls for Zebra scanners */
.btn-touch {
    min-height: var(--ave-touch-min);
    min-width: var(--ave-touch-min);
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
}

.touch-input,
.form-select.touch-input {
    min-height: var(--ave-touch-min);
    font-size: 1.1rem;
    border-radius: 8px;
}

.pin-input {
    letter-spacing: 0.35em;
    font-size: 1.25rem;
    text-align: center;
}

.touch-card {
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.touch-card .card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 0.85rem 1rem;
    font-size: 1rem;
}

.page-header {
    margin-bottom: 0.5rem;
}

.role-badge {
    padding: 0.5rem 0.85rem;
}

/* Navbar adjustments for small screens */
.navbar-brand {
    font-size: 1.25rem;
}

.navbar .nav-link {
    min-height: var(--ave-touch-min);
    display: flex;
    align-items: center;
    font-size: 1rem;
}

/* Table readability on small terminals */
.table {
    font-size: 0.95rem;
}

.table th,
.table td {
    padding: 0.75rem;
    vertical-align: middle;
}

/* High contrast focus for accessibility */
.form-control:focus,
.form-select:focus,
.btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.35);
}

/* Compact layout for narrow Zebra screens (320-480px) */
@media (max-width: 576px) {
    :root {
        --ave-font-base: 15px;
    }

    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .navbar-text {
        display: none !important;
    }

    .page-header h1 {
        font-size: 1.35rem;
    }

    .table {
        font-size: 0.875rem;
    }
}

/* Landscape orientation on handheld scanners */
@media (max-height: 500px) and (orientation: landscape) {
    .login-container {
        padding: 0.5rem;
    }

    .login-card .card-body {
        padding: 1.25rem !important;
    }

    .login-card .mb-4 {
        margin-bottom: 0.75rem !important;
    }
}

/* Reduce motion for performance on older devices */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
