/* Egyedi stílusok a Bootstrap kiegészítésére */

/* Általános stílusok */
body {
    background-color: #f8f9fa;
}

/* Oldalsáv stílusai */
.nav-link {
    border-radius: 0.25rem;
    margin-bottom: 0.2rem;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    padding: 0.6rem 0.8rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-left: 3px solid #0d6efd;
}

.nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 0.4rem;
    font-size: 1.1rem;
}

/* Sidebar alapstílusok */
.bg-dark {
    background: linear-gradient(180deg, #212529 0%, #343a40 100%) !important;
}

/* App címsor a sidebar fejlécében */
.sidebar-app-title {
    font-weight: 600;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #007bff, #6610f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 1rem 0;
    text-align: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Felhasználói dropdown a sidebar alján */
.dropdown-user {
    width: 100%;
    padding: 0.5rem;
    margin-top: auto;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.dropdown-user a {
    border-radius: 0.25rem;
    transition: all 0.2s;
    padding: 0.5rem;
}

.dropdown-user a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Almenü stílusok */
#mainMenu .collapse {
    transition: all 0.3s ease;
}

#mainMenu .collapse .nav-link {
    padding-left: 1rem;
    font-size: 0.9rem;
    margin-left: 0;
    border-radius: 0.25rem;
}

#mainMenu .nav-item {
    overflow: hidden;
}

/* Almenü ikon forgatása nyitáskor */
.nav-link[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

.bi-chevron-down {
    transition: transform 0.3s ease;
}

/* Dashboard kártyák testreszabása */
.card {
    transition: all 0.3s ease-in-out;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Egyedi animációk */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Bejelentkezési oldal háttere */
.login-background {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    min-height: 100vh;
}

/* Egyedi gomb animáció */
.btn {
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* Űrlap elemek testreszabása */
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

/* Ikonok méretezése */
.bi {
    vertical-align: -0.125em;
}

/* Táblázat sorainak stílusa */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Táblázat cellák vertikális középre igazítása */
.table th, 
.table td {
    vertical-align: middle;
}

/* Opcionálisan hozzáadhatja ezt is a táblázat fejléc soraihoz */
.table thead th {
    vertical-align: middle;
}

/* Kártyák fejléceinek stílusa */
.card-header {
    background-color: rgba(0, 0, 0, 0.03);
    font-weight: 500;
}

/* Badge-ek stílusa */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* Árajánlat és számla elemek stílusa */
.item-row {
    transition: background-color 0.2s;
}

.item-row:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* Űrlap segédosztályok */
.required-field::after {
    content: " *";
    color: #dc3545;
}

/* Jelszó erősség sáv stílusa */
.password-strength-meter {
    height: 5px;
    margin-top: 5px;
    background-color: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.password-strength-meter div {
    height: 100%;
    width: 0;
    transition: width 0.3s;
}

.password {
    height: 5px;
  }

.password-bar {
    width: 0%;
    transition: width 0.3s ease;
  }

/* Segítség ikonok */
.help-icon {
    color: #6c757d;
    cursor: pointer;
    transition: color 0.2s;
}

.help-icon:hover {
    color: #495057;
}

/* Akciógombok a táblázat sorokban */
.action-buttons {
    white-space: nowrap;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
}

/* Alert stílusok */
.alert {
    border-radius: 0.25rem;
    border-left-width: 4px;
}

/* Status badge színek */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25em 0.5em;
    border-radius: 50rem;
}

/* Új notification stílusok */
#notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 320px;
}

.notification {
    position: relative;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
}

.notification.show {
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
}

.notification-close {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    padding: 0 0 0 15px;
}

.notification-close:hover {
    opacity: 1;
}

/* Notification típusok */
.notification.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.notification.danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.notification.warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.notification.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Sidebar fix a footer részhez */
.sidebar-container {
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
  }
  
  .dropdown-user {
    margin-top: auto;
  }

/* Logo a sidebar-ban */
.sidebar-logo {
    max-height: 60px;
    max-width: 90%;
}

/* Általános beállítások oldal - logo preview konténer */
#logo-preview-container {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Logo az előnézeti konténerben */
#logo-preview-container img {
    max-height: 130px;
    max-width: 100%;
}

/* Fix fejléc osztály teljesen átdolgozva */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #f8f9fa;
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    width: calc(100% + 2rem) !important;
  }

/* Mobil optimalizáció */
@media (max-width: 767.98px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .dropdown-menu {
        position: absolute;
    }
    
    .nav-link {
        justify-content: center;
        text-align: center;
        padding: 0.5rem;
    }
    
    .nav-link i {
        margin-right: 0;
        font-size: 1.2rem;
    }
    
    #mainMenu .collapse .nav-link {
        padding-left: 0.5rem;
    }
    
    /* A mobil nézetre optimalizált oldalsó menü */
    .sidebar-mobile {
        display: block;
        position: fixed;
        bottom: 0;
        width: 100%;
        background: var(--bs-dark);
        z-index: 1000;
        display: flex;
        justify-content: space-around;
        padding: 0.5rem 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .sidebar-mobile a {
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        color: rgba(255, 255, 255, 0.7);
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .sidebar-mobile a i {
        font-size: 1.2rem;
        margin-bottom: 0.25rem;
    }
    
    .sidebar-mobile a.active {
        color: white;
    }
    
    /* Statisztikai kártyák igazítása */
    .stat-cards .col {
        margin-bottom: 1rem;
    }
    
    /* Profil dropdown teljes szélességre */
    .user-dropdown {
        position: static !important;
        width: 100%;
        transform: none !important;
    }
}

/* Tablet nézethez */
@media (min-width: 768px) and (max-width: 991.98px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar .nav-link span {
        display: none;
    }
    
    .sidebar .nav-link i {
        margin-right: 0;
        font-size: 1.2rem;
    }
    
    .content {
        margin-left: 60px;
    }
    
    .user-info .d-sm-inline {
        display: none !important;
    }
}

/* Nyomtatási stílusok */
@media print {
    body {
        background-color: #fff !important;
    }
    
    .d-print-none {
        display: none !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .container-fluid {
        padding: 0 !important;
    }
    
    a {
        text-decoration: none !important;
    }
    
    .table th, .table td {
        padding: 0.5rem !important;
    }
}

/* Mobil menü stílusok */
.mobile-menu-toggle {
    position: fixed;
    right: 15px;
    bottom: 15px;
    z-index: 1050;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.mobile-menu-toggle i {
    font-size: 1.5rem;
}

/* Mobil sidebar kezelése */
@media (max-width: 767.98px) {
    .col-auto.col-md-3.col-xl-2.px-0.bg-dark {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 80% !important;
        max-width: 300px;
        z-index: 1040;
        transition: left 0.3s ease;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    }
    
    body.sidebar-visible .col-auto.col-md-3.col-xl-2.px-0.bg-dark {
        left: 0;
    }
    
    /* Overlay a sidebar mögé */
    body.sidebar-visible::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1030;
    }
    
    /* Scrolling fix a sidebar tartalmára */
    .d-flex.flex-column.align-items-center.align-items-sm-start.min-vh-100 {
        overflow-y: auto;
        height: 100%;
    }
    
    /* Menü elemek stílusai mobilon */
    .nav-link span {
        display: inline !important; /* Mindig mutassa a szöveget mobilon is */
    }
    
    /* A menü ikonok méretezése mobilon */
    .nav-link i {
        font-size: 1.2rem;
        margin-right: 0.5rem;
    }
    
    /* Felső margin a tartalom résznek mobilon */
    .col.py-3 {
        margin-left: 0 !important;
        padding-bottom: 70px !important; /* helyet hagyunk a mobil menü gombnak */
    }
    
    /* Dropdown menü elhelyezése */
    .dropdown-menu {
        position: absolute !important;
        inset: auto auto auto 0px !important;
        margin: 0px !important;
        transform: translate3d(0px, -120px, 0px) !important;
    }
}