/* ============================================================
   INTRANET ÁLTALÁNOS ELEMEK BEÁLLÍTÁSAI
   /resources/intranet2.css
   ============================================================ */


/* =========================================================
   BETŰMÉRET
   ========================================================= */

html {
    font-size: 16px;
}

@media (max-width: 767px) {
    html {
        font-size: 14px;
    }
}


/* =========================================================
   ÁLTALÁNOS BEÁLLÍTÁSOK
   ========================================================= */

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    background-color: #121212;
    color: #e0e0e0;
}

body {
    display: flex;
    flex-direction: column;
    overscroll-behavior-y: auto;
}

#app {
    position: relative;
    flex: 0 0 calc(100dvh - 50px);
    width: 100%;
    height: calc(100dvh - 50px);
    min-width: 0;
    min-height: 0;
    margin: 50px 0 0 0;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    background-color: #121212;
}

@media (max-width: 767px) {
    #app-header {
        height: 50px;
        padding: 6px 8px;
        transition: transform .18s ease;
    }
    #app {
        margin-top: 50px;
        height: calc(100dvh - 50px);
        flex-basis: calc(100dvh - 50px);
        padding: 0;
        transition: margin-top .18s ease, height .18s ease, flex-basis .18s ease;
    }
    body.ib-mobile-headers-hidden .ib-view-header {
        transform: translateY(-46px);
    }
    body.ib-mobile-headers-hidden .ib-list-area {
        padding-top: 0;
    }
    body.ib-mobile-headers-hidden .list-view-container {
        top: 0;
    }
}

.app-view {
    width: 100%;
    height: 100%;
    min-height: 0;
}


/* =========================================================
   APP HEADER
   ========================================================= */

#app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 8px;
    border-radius: 10px 10px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: #0b2a4a;
    color: white;
    box-sizing: border-box;
}


/* ============================================================
   APP SETTINGS
   ============================================================ */

#app-settings {
    margin-left: 0;
    margin-right: 2px;
}

#app-settings-button:focus,
#app-settings-button:focus-visible {
    outline: none;
}

#app-settings-button i {
    font-size: 19px;
}

#app-settings-submenu {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    align-items: center;
    /* gap: 2px; */
    white-space: nowrap;
    z-index: 2100;
}

#app-settings-submenu[hidden] {
    display: none;
}

.app-settings-menu-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, .45);
    color: #ddd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.app-settings-menu-button:first-child {
    border-radius: 5px 0 0 5px;
}

.app-settings-menu-button:last-child {
    border-radius: 0 5px 5px 0;
}

.app-settings-menu-button:only-child {
    border-radius: 5px;
}

.app-settings-menu-button:hover {
    background: rgba(70, 70, 70, .9);
}

.app-settings-menu-button:focus,
.app-settings-menu-button:focus-visible {
    outline: none;
}

#app-settings-submenu #user-button {
    position: static;
    margin: 0 !important;
}

#app-settings-submenu #user-button i {
    font-size: 24px;
}

.app-settings-svg {
    width: 19px;
    height: 19px;
    display: block;
}


/* =========================================================
   USER MENU
   ========================================================= */

#user-menu {
    position: fixed;
    /* top: 8px; */
    right: 8px;
    z-index: 2000;
}


/*
 * A meglévő user-button most már az #app-settings
 * része, ezért a régi fix pozicionálás megszüntetése
 * szükséges.
 */

#app-settings #user-button {
    position: static;
    margin: 0 !important;
}

#app-settings #user-button i {
    font-size: 21px;
}

.user-button i {
    /* font-size: 32px; */
    color: #999;
    /* alap: nincs bejelentkezve */
}

.user-button.status-online i {
    color: #2e9d32;
    /* zöld: bejelentkezve */
}

.user-button.status-warning i {
    color: #e6a700;
    /* narancs: lejárt munkamenet / újrahitelesítés */
}

.user-button.status-error i {
    color: #d32f2f;
    /* piros: hiba */
}

#authOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.authSpinner {
    background: #444;
    padding: 20px 30px;
    border-radius: 10px;
    font-size: 18px;
}

.passkeyItem {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}


/* -------------------------------------------------
   EGYÉB ????
   ------------------------------------------------- */

#userModal .modal-dialog {
    width: min(1000px, 90vw);
    max-width: none;
}

#userModal .modal-content {
    min-height: 500px;
    height: min(1000px, 90vh);
}

.modal-subheader {
    padding: var(--bs-modal-header-padding);
    width: 100%;
}

.input-group-container {
    width: 100%;
    max-width: 250px;
}

.input-group-container .form-control,
.input-group-container .btn {
    width: 100%;
}

.modal-body {
    overflow: auto;
}

.btn-div {
    cursor: pointer;
}


/* =========================================================
   KÖZÖS FLOATING GOMBOK
   ========================================================= */

#app-floating-buttons {
    position: fixed;
    right: 30px;
    bottom: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
}

#app-floating-buttons .app-floating-button {
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid #555;
    border-radius: 50%;
    color: #ddd;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .6);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: background-color .15s, transform .15s;
}

#app-floating-buttons .app-floating-button:hover {
    background: #333;
    transform: scale(1.05);
}


/* =========================================================
   APP MENÜ OVERLAY
   ========================================================= */

#app-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 1999;
    background: rgba(0, 0, 0, .28);
    pointer-events: auto;
}

#app-menu-overlay.d-none {
    display: none !important;
}


/* =========================================================
   APP MENÜ
   ========================================================= */

#app-menu {
    position: relative;
    z-index: 2000;
    /* top: 8px; */
    /* left: 1px; */
    /* right: 8px; */
}

#app-menu-panel {
    position: absolute;
    display: none;
    top: calc(100% + 8px);
    left: 0;
    width: max-content;
    min-width: 250px;
    max-width: calc(100vw - 16px);
    max-height: min( 450px, calc(100vh - 80px));
    overflow-y: auto;
    margin: 0;
    padding: 0 10px 10px 10px;
    /* background: var(--bs-body-bg); */
    background: #444;
    border: 1px solid #666;
    border-radius: 18px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, .22);
    box-sizing: border-box;
}

#app-menu.open #app-menu-panel {
    display: inline-block;
}


/* Scrollbar */

#app-menu-panel {
    scrollbar-width: thin;
    scrollbar-color: #777 #444;
}

#app-menu-panel::-webkit-scrollbar {
    width: 6px;
}

#app-menu-panel::-webkit-scrollbar-track {
    background: #444;
    border-radius: 3px;
}

#app-menu-panel::-webkit-scrollbar-thumb {
    background: #777;
    border-radius: 3px;
}

#app-menu-panel::-webkit-scrollbar-thumb:hover {
    background: #999;
}


/* =========================================================
   APP MENÜ KIVÁLASZTOTT
   ========================================================= */

#app-menu-current {
    width: 48px;
    min-width: 48px;
    height: 32px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 16px;
    background: transparent;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
    box-sizing: border-box;
}


/* Ha app + funkció van */

#app-menu-current.has-function {
    width: max-content;
    min-width: 48px;
    padding-left: 12px;
    padding-right: 12px;
    gap: 10px;
}


/* Ikonok */

#app-menu-current i,
#app-menu-current img {
    flex: 0 0 auto;
}


/* Font Awesome */

#app-menu-current i {
    width: 20px;
    height: 20px;
    line-height: 20px;
    text-align: center;
}


/* App PNG */

#app-menu-current-image {
    width: 18px;
    height: 18px;
    object-fit: contain;
}


/* Funkció neve */

#app-menu-current-function {
    display: block;
    white-space: nowrap;
    text-align: left;
    font-size: 14px;
}


/* =========================================================
   APP MENÜ - EGYÉB
   ========================================================= */

.app-menu-app {
    /* padding: 5px 0; */
}

.app-menu-app+.app-menu-app {
    border-top: 1px solid #666;
    /* margin-top: 5px;
    padding-top: 10px; */
}

.app-menu-app-title {
    width: max-content;
    min-width: 100%;
    border: 0;
    background: transparent;
    color: #aaa;
    padding: 5px;
    padding-right: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.app-menu-app-title:hover {
    background: var(--bs-tertiary-bg);
}

.app-menu-app-title img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}


/* -------------------------------------------------
   Funkciók
   ------------------------------------------------- */

.app-menu-functions {
    display: flex;
    flex-direction: column;
    padding-left: 20px;
}

.app-menu-functions button {
    width: fit-content;
    border: 0;
    background: transparent;
    color: #999;
    padding: 3px 15px 3px 10px;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
}

.app-menu-functions button:hover {
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

.tree-line {
    display: inline-block;
    width: 12px;
    height: 10px;
    margin-right: 5px;
    border-left: 1px solid var(--bs-border-color);
    border-bottom: 1px solid var(--bs-border-color);
    vertical-align: 2px;
}


/* ============================================================
   ÁLTALÁNOS INTRANET MODAL
   ============================================================ */

#intranetPromptBody>div:empty {
    display: none;
}

.intranet-text-danger {
    color: #cb3636;
}

.intranet-text-warning {
    color: #beac76;
}

.intranet-btn-danger {
    border-color: #880707;
    background-color: #880707;
}

.intranet-btn-danger:hover {
    border-color: #640606;
    background-color: #640606;
}

.intranet-btn-warning,
.intranet-btn-warning:hover {
    border-color: #846f33;
    background-color: #846f33;
}


/* ============================================================
   FEJLÉC MŰVELETI IKONOK
   ============================================================ */

#header-action-buttons,
#app-settings {
    height: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2150;
}

#header-action-buttons {
    margin-left: auto;
    margin-right: 2px;
}

#header-action-buttons>.header-menu-item>.header-menu-button {
    background: transparent;
}

#header-action-buttons>.header-menu-item>.header-menu-button:hover,
#header-action-buttons>.header-menu-item>.header-menu-button.header-menu-active {
    background: transparent;
}

#header-action-buttons>.header-menu-item>.header-menu-button.header-menu-active {
    background: #555;
    border-radius: 5px;
}


/*
 * A legfelső LISTA gomb legyen önálló babgomb.
 */

#header-action-buttons .header-action-menu>.header-menu-item>.header-menu-button {
    border-radius: 26px;
}


/*
 * Az első szintű almenü.
 *
 * Közvetlenül a LISTA gomb alatt jelenik meg.
 */

#header-action-buttons .header-menu-item[data-menu-level="0"]>.header-menu-submenu {
    position: absolute;
    top: 100%;
    left: 0;
    display: flex;
    align-items: center;
    /* gap: 2px; */
    white-space: nowrap;
    z-index: 2100;
}


/*
 * A második szintű almenü.
 *
 * Például:
 *
 * Szűrés
 *    ↓
 * Hidden / Típus / Prioritás / Állapot
 */

#header-action-buttons .header-menu-item[data-menu-level="1"]>.header-menu-submenu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    display: flex;
    align-items: center;
    /* gap: 2px; */
    white-space: nowrap;
    z-index: 2200;
}

.header-menu-submenu[hidden] {
    display: none !important;
}


/*
 * Az almenük sorainak babgombjai.
 */

.header-menu-submenu .header-menu-item:first-child>.header-menu-button {
    border-radius: 5px 0 0 5px;
}

.header-menu-submenu .header-menu-item:last-child>.header-menu-button {
    border-radius: 0 5px 5px 0;
}

.header-menu-submenu .header-menu-item:only-child>.header-menu-button {
    border-radius: 5px;
}

#header-action-buttons .header-menu-submenu .header-menu-button,
#app-settings-submenu .app-settings-menu-button {
    background: #666;
    color: #eee;
}

.header-menu-button.header-menu-active,
#app-settings-button.app-settings-active {
    background: #555;
    /* border-radius: 5px; */
}

#app-settings-button {
    border-radius: 5px !important;
}

#header-action-buttons .header-menu-submenu .header-menu-button:hover,
#app-settings-submenu .app-settings-menu-button:hover {
    background: #777;
}

.header-action-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #adb5bd;
    font-size: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.header-action-button:hover {
    background: #343a40;
    color: #fff;
}

.header-action-button:focus,
.header-action-button:focus-visible {
    outline: none;
    background: #343a40;
    color: #fff;
}

.header-action-menu {
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-menu-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.header-menu-button,
#app-settings-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #ddd;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
    transition: background-color .15s ease, opacity .18s ease;
}

.header-menu-button:hover,
#app-settings-button:hover {
    /* background: rgba(70, 70, 70, .9); */
}

.header-menu-button:focus,
.header-menu-button:focus-visible,
#app-settings-button:focus,
#app-settings-button:focus-visible {
    outline: none;
}

.header-menu-button.header-menu-active {
    background: #555 !important;
}

.header-menu-button i {
    font-size: 19px;
}

.header-menu-icon {
    width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #eee;
}

.header-menu-svg {
    width: 19px;
    height: 19px;
    display: block;
    color: inherit;
    fill: currentColor;
}


/* ============================================================
 * HEADER MENU OVERLAY
 * ============================================================ */

.header-menu-overlay {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 2149;
}

.header-menu-overlay[hidden] {
    display: none;
}

#intranetPromptModal {
    z-index: 12000;
}


/* -------------------------------------------------
   Mobil
   ------------------------------------------------- */

@media (max-width: 767px) {
    #app-menu {
        /* top: 8px; */
        left: 8px;
        right: 8px;
    }
    #app-menu-current {
        min-height: 32px;
        height: 32px;
        padding-left: 14px;
        padding-right: 14px;
        border-radius: 17px;
    }
    #app-menu-current-image {
        width: 18px;
        height: 18px;
    }
    #app-menu-current-function {
        font-size: 14px;
    }
    #app-menu-panel {
        width: max-content;
        max-width: calc(100vw - 16px);
        max-height: min( 450px, calc(100vh - 80px));
        overflow-y: auto;
    }
    .app-menu-app-title {
        min-height: 48px;
        font-size: 14px;
    }
    .app-menu-functions button {
        font-size: 14px;
        padding: 5px 10px;
    }
    #app-floating-buttons {
        right: 70px;
        bottom: 70px;
    }
    #app-floating-buttons .app-floating-button {
        position: relative;
        right: -40px;
        bottom: -40px;
    }
    #header-action-buttons {
        /* margin-right: -10px; */
    }
    #app-settings {
        margin-right: -12px;
        width: 40px;
    }
}


/* ============================================================
   INPUTOS MODAL – MOBIL
   ============================================================ */

@media (max-width: 767.98px) {
    #intranetPromptModal.intranet-modal-with-input .modal-dialog {
        margin-top: 12px;
        margin-right: auto;
        margin-bottom: 12px;
        margin-left: auto;
        width: calc(100% - 24px);
        max-width: none;
        align-items: flex-start;
    }
    #intranetPromptModal.intranet-modal-with-input .modal-content {
        max-height: calc(100dvh - 24px);
        overflow-y: auto;
    }
}