/* =================================================================== */
/* GLOBAL RESET & ALAP BEÁLLÍTÁSOK */
/* =================================================================== */

#myCalendarContainer {
    width: 100%;
    height: calc(100vh - 50px); /* Kicsit magasabbra vettem a kényelemért */
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    background: #fff;
    /*font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 0px;
    overflow: hidden;
    position: relative;
}

.sc-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* =================================================================== */
/* GÖRGŐSÁV STÍLUSOK (KIZÁRÓLAG A NAPTÁR KONTÉNERÉN BELÜL) */
/* =================================================================== */

/* 1. Webkit alapú böngészők (Chrome, Edge, Safari, Opera) */
/* A #myCalendarContainer-en belüli összes elemre vonatkozik */

#myCalendarContainer *::-webkit-scrollbar {
    width: 6px;       /* Függőleges sáv szélessége */
    height: 6px;      /* Vízszintes sáv magassága */
}

#myCalendarContainer *::-webkit-scrollbar-track {
    background: transparent; /* A sáv háttere átlátszó */
}

#myCalendarContainer *::-webkit-scrollbar-thumb {
    background: #ccc;        /* A "húzókának" a színe */
    border-radius: 3px;      /* Lekerekítés */
}

#myCalendarContainer *::-webkit-scrollbar-thumb:hover {
    background: #bbb;        /* Sötétebb szín, ha ráviszed az egeret */
}

/* =================================================================== */
/* 1. FEJLÉC ÉS VEZÉRLŐK */
/* =================================================================== */

.sc-header {
    display: flex;
    flex-direction: column;
    padding: 10px 15px 0 15px;
    /*background-color: #f8f8f8;*/
    background-color: rgb(14, 19, 24);
    border-bottom: 1px solid #2c3e50;
    flex-shrink: 0; /* Nem nyomódhat össze */
}

.sc-header .sc-title {
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 2px solid rgba(44, 62, 80, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sc-title-month{
    font-size: 1.4rem;
    font-weight: bold;
    color: #ecf0f1;
    text-align: center;
}

.sc-title-weeknumber{
    font-size: 1rem;
    font-weight: bold;
    color: #ecf0f1;
    text-align: center;
}

.sc-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-bottom: 10px;
}

.sc-otherbutton-container{
    flex-grow: 1;
}

/* Gombok alapstílusa */
.sc-btn {
    border-radius: 4px;
    background: #fff;
    border: 1px solid #ddd;
    padding: 6px 12px;
    height:35px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.sc-btn:hover {
    background-color: #e9ecef;
    color: #333;
    border-color: #ccc;
}

.sc-btn:active {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.sc-btn-view.active {
    background-color: #0a9ebb;
    color: white;
    border-color: #0a9ebb;
    font-weight: bold;
}

.sc-controls > div { display: flex; gap: 8px; align-items: center; }

.sc-header .sc-btn {
    border-radius: 4px;

    /* Sötét gomb háttér, kicsit világosabb mint a header */
    background: #2b343e;
    border: 1px solid rgba(62, 75, 91, 0.5); /* Finom keret */

    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.9rem;

    /* Világos szöveg */
    color: #bdc3c7;

    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Hover (egér ráhúzás) a sötét gombokon */
.sc-header .sc-btn:hover {
    background-color: #34495e; /* Kicsit világosodik */
    color: #fff;
    border-color: #34495e;
}

/* Aktív nézet gomb (Hét/Hónap) */
.sc-header .sc-btn-view.active {
    background-color: #0a9ebb; /* A te kék színed */
    color: white;
    border-color: #0a9ebb;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(10, 158, 187, 0.4); /* Kis ragyogás */
}

/* Elválasztó vonalak (|) */
.sc-separator {
    color: rgba(74, 85, 104, 0.5) !important; /* Sötétszürke, hogy ne legyen zavaró */
    margin: 0 10px;
    user-select: none;
    font-weight: bold;
}


/* =================================================================== */
/* 2. NAPTÁR RÁCS ÉS CELLÁK */
/* =================================================================== */

.sc-days-header {
    display: grid;
    /*grid-template-columns: repeat(7, 1fr); RÉGI */
    grid-template-columns: repeat(7, minmax(0, 1fr));
    text-align: center;
    background: #fff;
    border-bottom: 1px solid #eee;
    color: #555;
    flex-shrink: 0;
    padding-right: 6px; /* Görgősáv helye */
}

.sc-header-day-item {
    padding: 10px 5px;
    border-right: 1px solid #f9f9f9;
}

.sc-header-day-name { font-size: 0.85rem; font-weight: bold; }
.sc-header-day-name-red { color: #D00; }
.sc-header-date { font-size: 1rem; margin-left: 5px; font-weight: bold; }

/* Aktuális nap kiemelése a fejlécben */
.sc-header-today .sc-header-date,
.sc-header-today .sc-header-day-name { color: #0a9ebb; font-weight: 800; }

/* Ünnepnap kiemelése */
.sc-header-day-item.sc-holiday .sc-header-day-name,
.sc-header-day-item.sc-holiday .sc-header-date { color: #D00 !important; font-weight: bold; }


/* --- NAPTÁR TEST (GÖRGŐS RÉSZ) --- */
.sc-body {
    flex-grow: 1;
    display: grid;
    /*grid-template-columns: repeat(7, 1fr);*/
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow-y: scroll; /* Mindig legyen görgetés, vagy auto */
    background-color: #fff;
}

.sc-day-cell {
    padding: 6px;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: relative;
    background: #fff;
    transition: background-color 0.2s;
    overflow: hidden;
    min-width: 0; /* Flexbox gyermekeknél fontos */
}

.sc-day-cell:hover { background-color: #fafafa; }

/* Egyéb hónap */
.sc-day-cell.other-month { background-color: #f9f9f9; }
.sc-day-cell.other-month .sc-day-number { color: #ccc; }

/* Mai nap */
.sc-today {
    /*background-color: #f0fbff !important; */
    background-color: rgba(253, 239, 169, 0.3) !important;
}

.sc-otherday {
    background-color: #f0fbff !important; /* EGYELŐRE NEM HASZNÁLT */
}

/* Ünnepnap */
.sc-holiday {
    background-color: rgba(255, 235, 235, 0.4) !important;
}

.sc-today.sc-holiday {
    background-color: rgba(253, 239, 169, 0.3) !important;
}

.sc-holiday .sc-day-number { color: #D00 !important; }

.sc-day-number {
    font-size: 0.85rem;
    font-weight: 600;
    color: #777;
    margin-bottom: 4px;
    align-self: flex-end;
}

/* =================================================================== */
/* 3. ESEMÉNYEK MEGJELENÉSE (CELLÁBAN) */
/* =================================================================== */

.sc-event {
    background-color: #3788d8;
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    cursor: pointer;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.sc-event:hover { opacity: 0.9; }

.sc-event-fullday {
    background-color: #1abc9c;
    font-weight: 600;
    text-align: center;
    border-left: 3px solid rgba(0,0,0,0.15);
}

.other-month .sc-event-fullday {
    opacity:0.2;
}

.sc-event-time { font-weight: 400; opacity: 0.9; margin-right: 4px; font-size: 0.7rem; }

.sc-event-summary {
    background-color: #eee !important;
    color: #555 !important;
    text-align: center;
    font-weight: 600;

}

.sc-event-description {
    display: block;
    font-size: 0.65rem;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =================================================================== */
/* 4. MODÁLIS ABLAK (FLEXBOX + STICKY FOOTER) */
/* =================================================================== */

.sc-modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);

    /* Flexbox középre igazítás */
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.sc-modal.visible {
    display: flex;
    opacity: 1;
}

.sc-modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 480px; /* Kompakt szélesség */

    /* Magasság kezelés */
    max-height: 85vh; /* Képernyő 85%-a max */
    height: auto;     /* De ha kevesebb a tartalom, összemegy */

    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);

    /* Belső elrendezés: Flex oszlop */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Lekerekítés miatt */
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sc-modal.visible .sc-modal-content {
    transform: scale(1);
}

/* --- HEADER (FIX) --- */
.sc-modal-header {
    padding: 12px 20px;
    background-color: #0a9ebb;
    color: white;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sc-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.sc-modal-close {
    color: rgba(255,255,255,0.8);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}
.sc-modal-close:hover { color: #fff; }

/* --- BODY (GÖRGETHETŐ) --- */
.sc-modal-body {
    padding: 20px;
    overflow-y: auto; /* Csak ez gördüljön! */
    flex-grow: 1;
}

/* --- FOOTER (FIX - STICKY) --- */
.sc-modal-footer {
    padding: 12px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    display: flex; /* Flexbox a JS-ben hozzáadott style:display='flex' miatt is */
    justify-content: flex-end;
    gap: 10px;
}

/* Footerben lévő gombok */
.sc-modal-footer .sc-btn {
    padding: 6px 14px;
    font-size: 0.85rem;
    min-width: 80px;
}

/* =================================================================== */
/* 5. ŰRLAP ELEMEK ÉS EGYÉB MODÁLIS TARTALOM */
/* =================================================================== */

.sc-form-group { margin-bottom: 12px; }

.sc-form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #444;
    font-size: 0.85rem;
}

.sc-form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.sc-form-control:focus {
    border-color: #0a9ebb;
    outline: none;
    box-shadow: 0 0 0 2px rgba(10, 158, 187, 0.1);
}

.sc-form-row {
    display: flex;
    gap: 15px;
}
.sc-form-row .sc-form-group { flex: 1; }

textarea.sc-form-control { resize: vertical; min-height: 60px; }

/* Modális listanézet elemei */
.sc-day-event-item {
    padding: 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sc-day-event-item p { margin: 0; font-size: 0.9rem; flex-grow: 1; }
.sc-btn-details { padding: 4px 10px; font-size: 0.8rem; margin-left: 10px; }

/* Link gombok a modálban */
.sc-modal-link-btn {
    display: inline-block;
    padding: 6px 12px;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    text-align: center;
}
.sc-modal-link-btn:hover { opacity: 0.9; }

/* =================================================================== */
/* 6. EGYÉB KOMPONENSEK (DROPDOWN, SELECT) */
/* =================================================================== */


.sc-user-select-container { }
.sc-user-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    padding-right: 25px !important;
    min-width: 140px;
}

/* Szűrő Dropdown */
.sc-filter-wrapper { position: relative; }

.sc-filter-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 1500;
    min-width: 220px;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    padding: 10px;
    border-radius: 6px;
    display: none;
    flex-direction: column;
    white-space: nowrap;
}
.sc-filter-dropdown.visible { display: flex; animation: fadeIn 0.2s; }

.sc-filter-label {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 0.9rem;
    border-radius: 4px;
}
.sc-filter-label:hover { background-color: #f5f5f5; }

.sc-filter-label input{
    margin-right:7px;
}

.sc-btn.sc-btn-filter-toggle{
    width:200px;
    text-overflow:ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.sc-filter-color-indicator {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 8px;
}
.sc-btn-ok { margin-top: 8px; align-self: flex-end; background-color: #0a9ebb; color: white; font-size: 0.8rem; }

/* Mobil elrejtés */
@media (max-width: 600px) {
    .mobilon_nem_lathato { display: none; }
    .sc-header .sc-title { font-size: 1.1rem; }
    .sc-modal-content { width: 95%; }
    .sc-form-row { flex-direction: column; gap: 0; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------- */
/* NÉVNAP ÉS ÜNNEPNAP A FEJLÉCBEN */
/* ------------------------------------------------------------------- */

.sc-header-info-container {
    margin-top: 5px;
    line-height: 1.2;
    overflow: hidden;
}

.sc-header-holiday-name {
    display: block;
    margin-top:5px;
    font-size: 0.65rem; /* Kis betű */
    font-weight: bold;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sc-holiday .sc-header-holiday-name {
    color:#D00;
}


.sc-header-nameday {
    font-size: 0.65rem; /* Kis betű */
    color: #0a9ebb;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}