/* === TÉMA ÉS ALAPBEÁLLÍTÁSOK (FINOMHANGOLVA) === */

/* Egyedi színpaletta és Bootstrap változók felüldefiniálása */
:root {
    --holiday-primary: #005A9C;
    /* Egy professzionális sötétkék */
    --holiday-secondary: #00A9E0;
    /* Egy élénkebb ciánkék az interakciókhoz */
    --holiday-success: #198754;
    --holiday-danger: #dc3545;
    --holiday-warning: #ffc107;
    --holiday-info: #0dcaf0;
    --holiday-light: #F8F9FA;
    --holiday-dark: #212529;
    --holiday-body-bg: #F5F7F8;
    /* Nagyon enyhe szürke a body háttérnek, melegebb érzet */
    --holiday-border-color: #dee2e6;
    /* Finom szegélyszín */
    --holiday-card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    /* Modern, lágy árnyék */
    --holiday-transition-speed: 0.2s;
    /* Globális sebesség a finom animációkhoz */

    /* Bootstrap változók felüldefiniálása a saját palettánkkal */
    --bs-primary: var(--holiday-primary);
    --bs-secondary: var(--holiday-secondary);
    --bs-body-bg: var(--holiday-body-bg);
    --bs-body-color: var(--holiday-dark);
    --bs-link-color-rgb: 0, 90, 156;
    /* --holiday-primary RGB-ben */
    --bs-link-hover-color-rgb: 0, 169, 224;
    /* --holiday-secondary RGB-ben */
    --bs-border-radius: .4rem;
}

/* === ALAPVETŐ ELEMEK ÉS ANIMÁCIÓK === */

/* Globális 'beúszás' animáció az oldaltartalomnak */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-content {
    animation: fadeIn 0.5s ease-out forwards;
}

body {
    font-family: 'Roboto', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 500;
    color: var(--holiday-primary);
}

a {
    transition: all var(--holiday-transition-speed) ease-in-out;
}

/* Scrollbar stílus (modern böngészőkben) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--holiday-body-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--holiday-border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--holiday-secondary);
}


/* === KOMPONENSEK FELÜLDEFINIÁLÁSA (FINOMÍTOTT VERZIÓ) === */

/* Navigációs sáv */
.navbar.bg-dark {
    background-color: var(--holiday-primary) !important;
    background-image: linear-gradient(145deg, var(--holiday-primary), #007bbd);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar .nav-link {
    position: relative;
    padding-bottom: .75rem;
    transition: color var(--holiday-transition-speed) ease;
}

/* Aláhúzás animáció az aktív/hover linkekhez */
.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: .25rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--holiday-secondary);
    transition: width var(--holiday-transition-speed) ease-in-out;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    width: 60%;
}

.navbar .nav-link.active {
    font-weight: 500;
    color: #fff !important;
}


/* Kártyák (Cards) */
.card {
    border: none;
    box-shadow: var(--holiday-card-shadow);
    border-radius: var(--bs-border-radius);
    transition: transform var(--holiday-transition-speed) ease-in-out, box-shadow var(--holiday-transition-speed) ease-in-out;
}

.card:hover {
    /* transform: translateY(-4px); */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--holiday-border-color);
    font-weight: 500;
    padding: 1rem 1.25rem;
}

/* Gombok (Buttons) */
.btn {
    border-radius: var(--bs-border-radius);
    font-weight: 500;
    padding: .6rem 1.2rem;
    transition: all var(--holiday-transition-speed) ease-in-out;
}

.btn-primary {
    background-image: linear-gradient(145deg, var(--holiday-primary), var(--holiday-secondary));
    border: none;
    box-shadow: 0 2px 6px rgba(0, 90, 156, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 169, 224, 0.5);
}

.btn-outline-primary {
    border-color: var(--holiday-primary);
    color: var(--holiday-primary);
}

.btn-outline-primary:hover {
    background-color: var(--holiday-primary);
    color: white;
}


/* Űrlap elemek */
.form-control,
.form-select,
.select2-container--bootstrap-5 .select2-selection {
    border: 1px solid var(--holiday-border-color);
    transition: all var(--holiday-transition-speed) ease;
}

.form-control:focus,
.form-select:focus,
.select2-container--bootstrap-5 .select2-selection--single:focus {
    border-color: var(--holiday-secondary);
    box-shadow: 0 0 0 4px rgba(0, 169, 224, 0.2);
    outline: none;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-radius: var(--bs-border-radius);
    border-color: var(--holiday-border-color);
    box-shadow: var(--holiday-card-shadow);
}


/* Táblázatok */
.table>:not(caption)>*>* {
    border-bottom-width: 1px;
}

.table-hover>tbody>tr {
    transition: all var(--holiday-transition-speed) ease;
}

.table-hover>tbody>tr:hover {
    background-color: rgba(0, 169, 224, 0.075);
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 10;
    position: relative;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
    background-color: var(--holiday-primary);
    border-color: var(--holiday-primary);
}

/* Oldalsó "Pills" navigáció a tab-os oldalakon */
.nav-pills .nav-link {
    transition: all var(--holiday-transition-speed) ease;
    border: 1px solid transparent;
}

.nav-pills .nav-link:not(.active):hover {
    background-color: rgba(0, 90, 156, 0.1);
    transform: translateX(4px);
    border-left: 3px solid var(--holiday-secondary);
}

.nav-pills .nav-link.active {
    background-image: linear-gradient(145deg, var(--holiday-primary), var(--holiday-secondary));
    box-shadow: 0 3px 8px rgba(0, 90, 156, 0.3);
}

/* Bootstrap Figyelmeztetések (Alerts) finomhangolása */
.alert {
    display: flex;
    align-items: center;
    border-left-width: 4px;
    border-radius: var(--bs-border-radius);
}

.alert .fas {
    margin-right: .75rem;
    font-size: 1.2em;
}

/* === SÖTÉT MÓD (DARK MODE) TÉMA === */
[data-bs-theme="dark"] {
    --bs-body-bg: #1c2128;
    --bs-body-color: #e6edf3;
    --bs-border-color: #30363d;
    --bs-card-bg: #22272e;
    --bs-list-group-bg: #22272e;
    --bs-modal-content-bg: #22272e;
    --bs-table-bg: var(--bs-card-bg);
    --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);

    .card {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        border-color: var(--bs-border-color);
    }

    .card:hover {
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    .form-control,
    .form-select,
    .select2-container--bootstrap-5 .select2-selection {
        background-color: #21262c;
        color: var(--bs-body-color);
        border-color: #3b424b;
    }

    .form-control::placeholder {
        color: #6e7681;
    }

    .dropdown-menu {
        backdrop-filter: blur(10px);
        background-color: rgba(45, 51, 59, 0.9);
    }

    .page-header {
        background-color: var(--bs-card-bg);
    }

    ::-webkit-scrollbar-thumb {
        background: #484f58;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #58a6ff;
    }
}

/* Témaváltó legördülő menü stílusai */
.dropdown-menu .theme-item .fa-fw {
    width: 2em;
    margin-right: .5em;
}

.theme-item-active {
    font-weight: bold;
}

.theme-item-active::before {
    content: '✓';
    margin-left: -2em;
    width: 2em;
    text-align: center;
    display: inline-block;
}


/* === EGYÉB OLDALSPECIFIKUS STÍLUSOK === */

/* Bejelentkező oldal */
.login-page-container {
    position: relative;
    background-image: url('../images/login-bg.jpg');
    /* Hivatkozás a képre */
    background-size: cover;
    background-position: center;
    min-height: calc(100vh - 56px);
    /* A navbar magasságát levonva */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-page-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 90, 156, 0.5);
    /* A --holiday-primary szín áttetsző változata */
    z-index: 1;
}

.login-card-wrapper {
    position: relative;
    z-index: 2;
    max-width: 450px;
    width: 100%;
}

.login-card-wrapper .card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    /* "Frosty glass" effektus, modern böngészőkben */
}

/* Page Header komponens */
.page-header {
    background: var(--bs-card-bg, #fff);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-radius: var(--bs-border-radius);
    box-shadow: var(--holiday-card-shadow);
}

/* Vissza a tetejére gomb */
.back-to-top {
    position: fixed;
    visibility: hidden;
    opacity: 0;
    right: 15px;
    bottom: 15px;
    z-index: 996;
    background: var(--holiday-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.4s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.back-to-top i {
    font-size: 24px;
    color: #fff;
    line-height: 0;
}

.back-to-top:hover {
    background: var(--holiday-primary);
    transform: translateY(-3px);
}

.back-to-top.active {
    visibility: visible;
    opacity: 1;
}

/* Placeholder stílusok a szerkesztőfelületre */
.placeholder {
    color: #888;
    text-align: center;
    font-style: italic;
    cursor: default;
    background-color: #f8f9fa;
    border: 1px dashed var(--holiday-border-color);
}

/* Calendar Events Styling for better separation */
.fc-event-item {
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    /* Finom fehér keret */
    margin-bottom: 2px !important;
    /* Nagyobb köz */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    /* Kis árnyék a térbeli hatásért */
}

/* Különböző státuszok vizuális jelzése a naptárban */
.event-approved {
    background-color: var(--holiday-success) !important;
    border-left: 4px solid #0f5132 !important;
    /* Sötétebb zöld sáv a bal szélen */
}

.event-pending {
    background-color: var(--bs-secondary) !important;
    border-left: 4px solid #484b4f !important;
    /* Sötétebb szürke sáv */
    opacity: 0.9;
}