/* Teljesen átlátszó hártya, homályosítás nélkül */
#szaki-panel-halyog, #szaki-hl-halyog {
    display: none; 
    position: fixed; top: 0; left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0,0); 
    z-index: 99998; 
}

/* Beúszó panel (400px széles) */
#szaki-globalis-szerkeszto, #szaki-hl-panel {
    position: fixed; top: 0; left: 0; 
    width: 400px; 
    max-width: 100vw; 
    height: 100%;
    background: var(--white); 
    border-right: 1px solid var(--border-main); 
    box-shadow: 5px 0 25px rgba(0,0,0,0.15); 
    padding: 30px 20px;
    z-index: 99999; 
    font-family: inherit; 
    box-sizing: border-box; 
    overflow-y: auto;
    transform: translateX(-105%); 
    transition: transform 0.3s ease-in-out;
}

.szaki-hl-loading { opacity: 0.5; pointer-events: none; }

#szaki-globalis-szerkeszto.nyitva, #szaki-hl-panel.nyitva {
    transform: translateX(0);
}

.szaki-dinamikus-csoport, .szaki-hl-csoport { 
    margin-bottom: 20px; 
}

.szaki-dinamikus-label, .szaki-hl-label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 400; 
    font-size: 15px; 
    color: var(--main-t-8); 
    letter-spacing: 0.5px;
}

.szaki-dinamikus-input, .szaki-hl-input { 
    width: 100%; 
    padding: 0 16px; 
    min-height:45px; 
    border: 1px solid var(--border-main); 
    background: var(--szaki-input-bg); 
    color: var(--main);  
    border-radius: 8px; 
    font-size: 15px; 
    box-sizing: border-box; 
    font-family: inherit; 
    transition: border-color 0.3s;
}

.szaki-dinamikus-input:focus, .szaki-hl-input:focus { 
    border-color: var(--brand-cta); 
    outline: none; 
}

textarea.szaki-dinamikus-input, textarea.szaki-hl-input { 
    resize: vertical; 
    min-height: 100px; 
    padding-top: 12px;
}

.szaki-hl-input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        width: 46px !important;
        height: 24px !important;
        min-height: 24px !important;
        background: rgba(170, 170, 170, 0.3);
        border-radius: 24px;
        position: relative;
        cursor: pointer;
        outline: none;
        border: none;
        transition: background 0.3s ease;
        margin-top: 5px;
        padding: 0 !important;
    }

.szaki-hl-input[type="checkbox"]::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.szaki-hl-input[type="checkbox"]:checked {
    background: var(--brand-cta);
}
.szaki-hl-input[type="checkbox"]:checked::after {
        transform: translateX(22px);
    }

/* Gombok formázása */
#szaki-szerkeszto-mentes, #szaki-hl-mentes {
    background: var(--brand-cta); 
    color: var(--main-d-3); 
    border: none; 
    padding: 14px 20px; 
    border-radius: 6px; 
    width: auto; 
    font-weight: 400; 
    cursor: pointer; 
    font-size: 14px; 
    margin: 32px auto 0 auto; /* Fent 10px, Jobb auto, Lent 0, Bal auto */ 
    text-align: center; 
    display:block;
    /*transition: background-color 0.3s ease, opacity 0.2s;*/
}

#szaki-szerkeszto-mentes:hover, #szaki-hl-mentes:hover {
    background: var(--brand-cta);
    position: center;
}

#szaki-szerkeszto-megsem, #szaki-hl-megsem {
    background: transparent; 
    color: #888; 
    border: none; 
    padding: 12px 20px; 
    width: 100%; 
    margin-top: 5px; 
    cursor: pointer; 
    font-size: 14px; 
    font-weight: 400;
    text-align: center; 
    transition: color 0.3s ease;
}

#szaki-szerkeszto-megsem:hover, #szaki-hl-megsem:hover {
    color: var(--brand-cta);
}

/* Bezáró X a Headless panelhez */
#szaki-hl-bezaro-x {
    position: absolute; 
    top: 20px; 
    right: 20px; 
    width: 32px; 
    height: 32px; 
    background: #f1f5f9; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    color: #333; 
    transition: background 0.2s ease;
}
#szaki-hl-bezaro-x:hover { 
    background: #e2e8f0; 
}

#szaki-hl-cim { 
    margin-top:0; 
    margin-bottom:0px; 
    color:var(--main); 
    font-size: 22px; 
    font-weight:500;
    text-align: center; 
}

.szaki-hl-alcim { 
    margin-top:8px; 
    margin-bottom:48px; 
    color:var(--main-t-6); 
    font-size: 14px; 
    font-weight: 400;
    text-align: center;
}

/* Képfeltöltő Zóna */
.szaki-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    padding: 30px;
    text-align: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}
.szaki-dropzone:hover, .szaki-dropzone.dragover {
    border-color: #3b82f6; /* Kékre vált, ha fölé húzzák a képet */
    background: #eff6ff;
    color: #1e40af;
}

/* Bélyegképek rácsa */
.szaki-galeria-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.szaki-preview-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    cursor: grab; /* Jelzi, hogy mozgatható */
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.szaki-preview-item:active { cursor: grabbing; }
.szaki-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.szaki-preview-item.loading {
    font-size: 10px;
    color: #94a3b8;
}
/* Törlés "X" gomb */
.szaki-remove-img {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
}
.szaki-remove-img:hover { background: #dc2626; }

/*--------------------------------------------------------*/
/*        WYSIWYG teljes képernyős megjelenítése          */  
/*--------------------------------------------------------*/
/* Az "Expand" (Nagyító) gomb alapstílusa */
.szaki-wysiwyg-expand {
    position: absolute;
    top: -30px;
    right: 0;
    background: transparent;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #555;
    z-index: 10;
}
.szaki-wysiwyg-expand:hover { color: #000; }

/* ÚJ: A fizikai sötétítő réteg */
.szaki-wysiwyg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 999998;
    cursor: pointer;
}

/* A teljes képernyős mód állapota (box-shadow nélkül) */
.szaki-wysiwyg-wrapper.szaki-fullscreen-mode {
    position: fixed !important;
    top: 5vh;
    left: 5vw;
    width: 90vw;
    height: 90vh;
    z-index: 999999;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* ÚJ: A Bezárás gomb stílusa teljes képernyőnél (fehér színnel a doboz felett) */
.szaki-wysiwyg-expand.szaki-is-fullscreen-btn {
    top: -35px;
    right: 0;
    color: #fff;
    font-weight: bold;
}
.szaki-wysiwyg-expand.szaki-is-fullscreen-btn:hover { color: #ddd; }

.szaki-wysiwyg-wrapper.szaki-fullscreen-mode .szaki-quill-editor {
    flex-grow: 1;
    height: auto !important;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}