/* Mobile-First PWA Styling for Hostel Inspection System */

:root {
    --primary-blue: #1e3a8a;
    --primary-light: #3b82f6;
    --accent-green: #10b981;
    --card-bg: #ffffff;
    --touch-target-min: 44px;
}

/* Global mobile adjustments */
body {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    touch-action: manipulation;
}

/* Ensure no horizontal overflow */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Touch-friendly inputs and buttons */
button, 
.btn, 
input[type="button"], 
input[type="submit"], 
.form-control, 
.form-select {
    min-height: var(--touch-target-min);
    font-size: 1rem;
    border-radius: 8px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
    transform: scale(0.98);
}

/* Form input spacing and tap targets on mobile */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label, label {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    display: inline-block;
    color: #334155;
}

/* Radio buttons and checkboxes touch ergonomics */
input[type="radio"], 
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    vertical-align: middle;
    margin-right: 6px;
}

.radio-inline, .checkbox-inline {
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    margin-bottom: 8px;
    cursor: pointer;
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 6px;
    user-select: none;
}

/* Card and container responsiveness */
.card, .container, .container-fluid {
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Table mobile responsiveness */
.table-responsive {
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

/* PWA Install Banner Button */
#pwaInstallBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    padding: 10px 20px;
}

/* Mobile Screens (< 768px) */
@media (max-width: 767.98px) {
    .container, .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }

    h1, .h1 {
        font-size: 1.6rem;
    }

    h2, .h2 {
        font-size: 1.35rem;
    }

    h3, .h3 {
        font-size: 1.15rem;
    }

    /* Stack sticky inspection tabs vertically or allow smooth horizontal scroll */
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom: 2px solid #e2e8f0;
        padding-bottom: 4px;
    }

    .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 0.9rem;
    }

    /* Full width modal dialogs on mobile */
    .modal-dialog {
        margin: 8px;
        max-width: calc(100% - 16px);
    }
}
