/* =============================================
   EASYWAY - HEADER.CSS
   VERZIA: 39.0.0 (FIXNÁ VEĽKOSŤ USER INFO BOXU PRE VŠETKY ŠÍRKY POD 900px)
   ============================================= */

:root {
    --primary-color: #1a2b6e;
    --primary-dark: #0d1a4d;
    --primary-light: #4a64d4;
    --white: #ffffff;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================
   HLAVNÝ WRAPPER - FIXNÝ HEADER
   ============================================= */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1002;
    background: var(--white);
    transition: all 0.3s ease-in-out;
    border-bottom: none !important;
    box-shadow: none !important;
}

/* =============================================
   LOGO KONTAJNER
   ============================================= */
.logo-container {
    text-align: center;
    padding: 15px 0;
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease-in-out;
    max-height: 100px;
    overflow: hidden;
}

.logo-container img {
    max-width: 180px;
    height: auto;
}

.logo-container.logo-hidden {
    max-height: 0;
    padding: 0;
    border-bottom: none;
    opacity: 0;
    visibility: hidden;
}

/* =============================================
   HLAVNÝ HEADER (MENU)
   ============================================= */
.site-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    width: 100%;
    position: relative;
    border-bottom: none !important;
    box-shadow: none !important;
    transition:
        transform 0.3s ease,
        opacity 0.3s ease;
}

.site-header::before,
.site-header::after {
    display: none !important;
    content: none !important;
}

.site-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px 30px;
    gap: 15px;
    flex-wrap: wrap;
    min-height: 70px;
    border-bottom: none !important;
    box-shadow: none !important;
    position: relative;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 14px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 40px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-2px);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.28);
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* =============================================
   HAMBURGER MENU - S ANIMÁCIOU NA X
   ============================================= */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 8px;
    z-index: 1003;
    padding: 0;
    margin: 0 auto;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    align-self: center;
}

.hamburger-menu span {
    display: block;
    width: 20px;
    height: 2.5px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.25s ease-in-out !important;
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}
.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.hamburger-menu:focus,
.hamburger-menu:focus-visible,
.hamburger-menu:active {
    outline: none !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.hamburger-menu:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5) !important;
    outline-offset: 2px;
}

.mobile-logo {
    display: none !important;
}

/* =============================================
   MOBILNÉ MENU
   ============================================= */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    z-index: 1001;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.mobile-menu.active {
    max-height: 80vh;
    overflow-y: auto;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 10px;
}

.mobile-menu-close {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 20px;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    text-align: right;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: var(--transition);
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.mobile-nav-link {
    display: block;
    text-align: center;
    padding: 14px 16px;
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.mobile-nav-link.active {
    background: rgba(255, 255, 255, 0.28);
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

.mobile-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 12px 0;
}

.mobile-info-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 15px 20px;
    margin-top: 15px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-info-icon {
    font-size: 24px;
}

.mobile-info-text {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* =============================================
   USER INFO BOX - FIXNÁ VEĽKOSŤ PRVKOV (PRE VŠETKY VEĽKOSTI)
   ============================================= */
.user-info-box {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom: none;
    padding: 8px 30px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.user-info-box .user-info-container {
    display: flex;
    justify-content: center !important;
    align-items: center;
    gap: 20px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    flex-wrap: wrap;
}

/* 🔥 FIXNÁ VEĽKOSŤ – rovnaká pre všetky šírky */
.login-status {
    color: var(--white);
    font-size: 14px;
    background: rgba(255, 255, 255, 0.12);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.user-name {
    font-weight: 700;
    font-size: 14px;
    color: white;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.user-email {
    color: rgba(255, 255, 255, 0.8);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.moja-zona-btn,
.logout-btn {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    min-width: 100px;
}

.moja-zona-btn:hover,
.logout-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.online-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

.indicator-dot {
    width: 10px;
    height: 10px;
    background-color: #27ae60;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.5);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.5);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(39, 174, 96, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(39, 174, 96, 0);
    }
}

.role-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
}

.role-badge.super-admin {
    background: linear-gradient(135deg, #8a2be2, #6a1cb0);
    color: white;
}
.role-badge.manager {
    background: linear-gradient(135deg, #ffd700, #ffc107);
    color: #1a2b6e;
}
.role-badge.dopravca {
    background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
    color: #1a2b6e;
}
.role-badge.zamestnanec {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    color: white;
}
.role-badge.uzivatel {
    background: linear-gradient(135deg, #ff8c00, #e67e22);
    color: white;
}

/* =============================================
   HLAVNÝ OBSAH
   ============================================= */
.main-content {
    transition: padding-top 0.3s ease-out !important;
}

body.menu-open {
    overflow: hidden;
}

/* =============================================
   SKRYTIE MODRÉHO HEADER PANELU PO OTVORENÍ MOBILNÉHO MENU
   ============================================= */
body.menu-open .site-header {
    display: none !important;
}

/* =============================================
   RESPONZÍVNE ÚPRAVY (LEN ZAROVNANIE – NEMENIŤ VEĽKOSŤ!)
   ============================================= */

/* Všetky veľkosti, kde sa zobrazuje hamburger menu (do 900px) */
@media (max-width: 900px) {
    .nav-center {
        display: none !important;
    }

    .hamburger-menu {
        display: flex !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
        margin: 0 auto !important;
        transform: none !important;
    }

    .site-header nav {
        justify-content: center !important;
        padding: 12px 20px !important;
        min-height: 60px;
    }

    .logo-container img {
        max-width: 140px;
    }

    .user-info-box {
        padding: 6px 15px;
    }

    .user-info-box .user-info-container {
        justify-content: center !important;
        gap: 15px;
    }

    /* 🔥 LEN ZAROVNANIE – ŽIADNE ZMENY VEĽKOSTI */
    .login-status {
        justify-content: center !important;
        text-align: center;
        /* VEĽKOSŤ OSTÁVA ROVNAKÁ AKO PRI 901px */
    }

    .moja-zona-btn,
    .logout-btn {
        /* VEĽKOSŤ OSTÁVA ROVNAKÁ AKO PRI 901px */
    }

    .mobile-menu.active {
        max-height: 70vh;
    }

    .mobile-menu-content {
        padding: 15px;
        gap: 8px;
    }

    .mobile-nav-link {
        padding: 12px;
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .site-header nav {
        padding: 10px 15px !important;
        min-height: 55px;
    }

    .logo-container img {
        max-width: 120px;
    }

    .hamburger-menu {
        width: 32px;
        height: 32px;
        gap: 4px;
    }

    .hamburger-menu span {
        width: 18px;
        height: 2px;
    }

    .user-info-box {
        padding: 5px 12px;
    }

    .mobile-menu-content {
        padding: 12px;
    }

    .mobile-nav-link {
        padding: 10px;
        font-size: 14px;
    }

    .mobile-menu.active {
        max-height: 65vh;
    }
}

@media (max-width: 600px) {
    .site-header nav {
        padding: 8px 12px !important;
        min-height: 50px;
    }

    .logo-container img {
        max-width: 100px;
    }

    .hamburger-menu {
        width: 30px;
        height: 30px;
        gap: 3px;
    }

    .hamburger-menu span {
        width: 16px;
        height: 2px;
    }

    .user-info-box {
        padding: 4px 10px;
    }

    .mobile-menu-content {
        padding: 12px;
        gap: 6px;
    }

    .mobile-nav-link {
        padding: 10px;
        font-size: 13px;
    }

    .mobile-menu.active {
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .logo-container img {
        max-width: 80px;
    }

    .hamburger-menu {
        width: 28px;
        height: 28px;
    }

    .mobile-menu-content {
        padding: 10px;
        gap: 5px;
    }

    .mobile-nav-link {
        padding: 8px;
        font-size: 13px;
    }

    .mobile-menu.active {
        max-height: 55vh;
    }
}

/* =============================================
   ODSTRÁNENIE MODREJ ČIARY ZO VŠETKÝCH PRVKOV
   ============================================= */
.header-wrapper,
.header-wrapper *,
.site-header,
.site-header *,
.logo-container,
.logo-container *,
nav,
nav *,
.user-info-box,
.user-info-box * {
    border-bottom: none !important;
    box-shadow: none !important;
    outline: none !important;
}

.header-wrapper::before,
.header-wrapper::after,
.site-header::before,
.site-header::after,
.logo-container::before,
.logo-container::after,
nav::before,
nav::after,
.user-info-box::before,
.user-info-box::after {
    display: none !important;
    content: none !important;
}

.logo-container {
    border-bottom: 1px solid rgba(0, 0, 0, 0.03) !important;
}

.user-info-box {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: none !important;
}

/* =============================================
   TLAČ
   ============================================= */
@media print {
    .header-wrapper,
    .mobile-menu,
    .mobile-menu-overlay,
    .user-info-box {
        display: none !important;
    }
    .main-content {
        padding-top: 20px !important;
    }
}
