/* assets/css/style.css - Mobile-First Design */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --dark: #2c3e50;
    --light: #f5f7fa;
    --text: #333;
    --text-muted: #7f8c8d;
    --radius: 8px;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --touch-target: 44px; /* Minimum touch target size */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
    -webkit-tap-highlight-color: transparent;
    font-size: 16px; /* Base font size for mobile */
}

/* ============================================
   MOBILE-FIRST LAYOUT
   ============================================ */

/* Login/Register Pages */
.login-container,
.registration-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px;
}

.login-box,
.registration-box {
    background: white;
    padding: 24px 20px;
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

/* Touch-friendly inputs */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px; /* Larger touch target */
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 16px; /* Prevents iOS zoom */
    transition: border-color 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
    background: white;
    min-height: var(--touch-target);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* Touch-friendly buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-height: var(--touch-target);
    min-width: var(--touch-target);
    text-align: center;
    touch-action: manipulation;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover,
.btn-primary:active {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:active {
    background: #218838;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:active {
    background: #c82333;
}

.btn-warning {
    background: var(--warning);
    color: #212529;
}

.btn-warning:active {
    background: #e0a800;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:active {
    background: #5a6268;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 14px;
    min-height: 40px;
}

/* Alert styles - touch friendly */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid transparent;
    font-size: 15px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Badge styles */
.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.badge-success { background: var(--success); color: white; }
.badge-warning { background: var(--warning); color: #212529; }
.badge-danger { background: var(--danger); color: white; }
.badge-info { background: #17a2b8; color: white; }
.badge-secondary { background: #6c757d; color: white; }

/* Login footer */
.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.login-footer p {
    margin: 8px 0;
    font-size: 15px;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-white { color: white; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }

.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

.p-20 { padding: 20px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }

.w-100 { width: 100%; }

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Large phones and small tablets */
@media (min-width: 576px) {
    .login-box,
    .registration-box {
        padding: 32px 40px;
    }
}

/* Tablets */
@media (min-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 15px;
    }
}

/* Desktops */
@media (min-width: 992px) {
    .login-box,
    .registration-box {
        padding: 40px 48px;
        max-width: 450px;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */

/* Remove hover effects on touch devices */
@media (hover: none) {
    .btn:hover {
        transform: none !important;
    }
    
    .stat-card:hover {
        transform: none !important;
    }
    
    .booth-slot:hover:not(.reserved):not(.confirmed):not(.blocked) {
        transform: none !important;
    }
}

/* Prevent text size adjustment on orientation change */
html {
    -webkit-text-size-adjust: 100%;
}

/* Smooth scrolling */
* {
    -webkit-overflow-scrolling: touch;
}

/* Better tap highlights */
a, button, .btn, .booth-slot {
    -webkit-tap-highlight-color: rgba(52, 152, 219, 0.2);
}