/* RJA Munkalapok — egyedi stílusok + PWA / mobile felület */

:root {
    --safe-top:    env(safe-area-inset-top, 0);
    --safe-bottom: env(safe-area-inset-bottom, 0);
    --safe-left:   env(safe-area-inset-left, 0);
    --safe-right:  env(safe-area-inset-right, 0);
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: none;
}

/* Safe-area iPhone notch / home-indicator alá */
.navbar { padding-left: max(.75rem, var(--safe-left)); padding-right: max(.75rem, var(--safe-right)); padding-top: max(.5rem, var(--safe-top)); }
main    { padding-left: max(.75rem, var(--safe-left)); padding-right: max(.75rem, var(--safe-right)); }
.pb-safe { padding-bottom: calc(1rem + var(--safe-bottom)); }

.navbar-brand { letter-spacing: .02em; }

/* Sticky nav, hogy mindig látszódjon mobilon */
nav.navbar { position: sticky; top: 0; z-index: 1000; }

/* Touch-friendly tap targets — minimum 44px az iOS HIG szerint */
.btn, .form-control, .form-select, .nav-link, .dropdown-item {
    min-height: 44px;
}
.btn-sm, .form-control-sm, .form-select-sm { min-height: 36px; }

/* Standalone (PWA) módban kicsit más a szegély */
@media (display-mode: standalone) {
    body { background-color: #f5f5f5; }
    footer { display: none; }
    main { padding-bottom: calc(2rem + var(--safe-bottom)); }
}

/* Mobil-optimalizált fülek (státusz csempék) */
@media (max-width: 575px) {
    .display-5 { font-size: 1.75rem; }
    h1.h3 { font-size: 1.4rem; }
    .table { font-size: .9rem; }
    .table td, .table th { padding: .5rem .35rem; }
    .card-body { padding: 1rem; }
}

/* Pull-to-refresh-mentes scrolling érzés mobilon */
main { -webkit-overflow-scrolling: touch; }

.priority-badge { font-size: .85em; padding: .35em .6em; }

.ws-card .ws-meta { font-size: .85em; color: #6c757d; }

.attachment-thumb {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: .5rem;
    border: 1px solid #dee2e6;
}

.log-entry { font-size: .9em; border-left: 3px solid #dee2e6; padding-left: .75rem; }
.log-entry + .log-entry { margin-top: .5rem; }

.tab-count {
    background: rgba(0,0,0,.08);
    padding: .15em .5em;
    border-radius: 1em;
    font-size: .8em;
    margin-left: .35em;
}

table.ws-list td { vertical-align: middle; }

/* Floating action button mobilon — gyors új munkalap */
.fab {
    position: fixed;
    right: calc(1rem + var(--safe-right));
    bottom: calc(1rem + var(--safe-bottom));
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #198754;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    font-size: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    text-decoration: none;
}
.fab:hover, .fab:focus { color: white; background-color: #157347; }

@media (max-width: 767px) {
    .fab { display: flex; }
}

/* iOS install hint banner (ha kell) */
.install-hint {
    background: #fff3cd;
    border-bottom: 1px solid #ffeeba;
    padding: .5rem 1rem;
    text-align: center;
    font-size: .9rem;
}
