


/* ============================
   Tiszta CSS 5_1_15
   1 - GLOBAL / RESET / ALAPOK
   ============================ */

.container {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    min-height: 100vh;
    background: #f5f0e6;
    width: 100%;
    box-sizing: border-box;
}

/* TOAST */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    display: flex;
    gap: 15px;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 9999;
}
.toast.show { opacity: 1; }

#toast-close {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.8;
}
#toast-close:hover { opacity: 1; }


/* ============================
   2 - LAYOUT BLOKKOK (DESKTOP)
   ============================ */

/* BAL OLDALI MENÜ */
.left-column {
    width: 180px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #e8dcc4;
    border-right: 3px solid #bfae8c;
    box-sizing: border-box;
}

.bat { padding: 5px; }
.btn1 { color:white; background-color: green; }
.btn2 { color:white; background-color: blue; }
.btn3 { color:white; background-color: red; }

.logo-img {
    height: 70px;
    margin-right: 10px;
    vertical-align: middle;
}

/* JOBB OLDALI FŐOSZLOP */
.right-column {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 15px;
    box-sizing: border-box;
}

/* FŐ TARTALMI SOR */
.content-row {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
    width: 100%;
    box-sizing: border-box;
}

/* VIEWER BLOKK */
.viewer-block {
    flex: 1;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-sizing: border-box;
}

/* VIEWER */
.viewer {
    width: 100%;
    height: 380px;
    background: #ffffff;
    border: 3px solid #bfae8c;
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* META */
.meta {
    width: 100%;
    background: #ffffff;
    border: 3px solid #bfae8c;
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    font-size: 14px;
}

/* LAPOZÓ */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}
.nav-buttons button {
    flex: 1;
    min-width: 120px;
    padding: 2px 12px;
    font-size: 12px;
    cursor: pointer;
}

/* MINI KÉPEK */
.thumb-block {
    width: 360px;
    height: 455px;
    flex-shrink: 0;
    overflow-y: auto;
    padding-right: 6px;
    border: 2px solid #bfae8c;
    border-radius: 6px;
    padding: 5px;
    box-sizing: border-box;
}
.thumb-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.thumb-grid img {
    width: 100%;
    max-width: 120px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border: 2px solid #bfae8c;
    border-radius: 4px;
    cursor: pointer;
}


/* ============================
   3 - KOMPONENS BLOKKOK
   ============================ */

/* KIJELÖLŐ OVERLAY */
#select-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
}
#select-inner {
    background: #fff;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    border-radius: 10px;
    max-height: 85vh;
    overflow-y: auto;
}
.select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.select-item {
    background: #f3f3f3;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    border: 3px solid transparent;
}
.select-item.selected { border-color: #d9534f; }
.select-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* LIGHTBOX */
#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}
#lightbox-inner {
    width: 90vw;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}
#lightbox-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
#lightbox-img.show { opacity: 1; }
.lb-prev, .lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
    user-select: none;
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 32px;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
}

/* LETÖLTÉS MEGERŐSÍTŐ OVERLAY */
.confirm-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.confirm-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 260px;
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
}
.confirm-box p {
    font-size: 18px;
    margin-bottom: 15px;
}
.confirm-box button {
    margin: 10px;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.confirm-yes { background: #4CAF50; color: white; }
.confirm-no { background: #d9534f; color: white; }

#toast-popup-box {
    animation: fadeOut 0.4s ease-in-out forwards;
    animation-delay: 2.8s;
}
@keyframes fadeOut {
    to { opacity: 0; transform: scale(0.95); }
}

/* ZIP FELSŐ GOMBSOR */
#select-topbar {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 10px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    border-bottom: 2px solid #ddd;
    z-index: 1000;
}
#select-topbar button {
    padding: 10px 14px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    cursor: pointer;
}
#sel-all { background: #4CAF50; color: white; }
#sel-reset { background: #FF9800; color: black; }
#sel-zip { background: #2196F3; color: white; }
#sel-cancel { background: #F44336; color: white; }

/* ALBUM HEADER */
.album-header {
    background: white;
    border-bottom: 2px solid #bfae8c;
    padding: 8px 16px;
    box-sizing: border-box;
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.header-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.header-center {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    flex-grow: 0;
    flex-shrink: 1;
    text-align: left;
}
.album-title {
    font-size: 20px;
    color: #266;
    margin: 0;
}
.album-meta {
    font-size: 16px;
    color: blue /*#6d5e4c;*/
}
.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hamburger {
    font-size: 30px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    background: #e8dcc4;
    border: 2px solid #bfae8c;
}


/* ============================
   4 - MEDIA QUERY-K
   ============================ */

/* TABLET */
@media (max-width: 1100px) {
    .thumb-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* MOBIL – 800px alatt */
@media (max-width: 800px) {

    .viewer {
        height: 45svh;
    }

    .container {
        flex-direction: column;
    }

    .hamburger {
        display: block;
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 100000;

        flex: 0 0 auto;
        width: 48px;
        text-align: center;
    }

    .content-row {
        flex-direction: column;
        gap: 15px;
    }

    .viewer-block {
        max-width: 100%;
    }

    .viewer,
    .meta {
        width: 100%;
    }

    .left-column {
        display: none;
        position: absolute;
        top: 60px;
        right: 10px;
        width: 220px;
        background: #e8dcc4;
        border: 2px solid #bfae8c;
        border-radius: 8px;
        padding: 15px;
        z-index: 999;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }
    .left-column.show { display: block; }
    .left-column button { margin-bottom: 12px; }

    .thumb-block {
        width: 100%;
        height: auto;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
    }

    .thumb-grid {
        display: flex;
        flex-direction: row;
        gap: 10px;
    }

    .thumb-grid img {
        flex: 0 0 auto;
        max-width: 120px;
    }

    
    /* FIXÁLT HEADER-CENTER SZÉLESSÉG */
    .header-center {
        width: 550px; /*130*/
        min-width: 0;
        flex: 0 1 auto;
    }
	.album-header {
        padding: 6px 10px;
    }

    .header-top {
        justify-content: flex-start;
        gap: 6px;
    }

    .album-title {
        font-size: 15px;
        line-height: 1.1;
    }

    .album-meta {
        font-size: 13px;
        line-height: 1.1;
		color: green;
    }
	.album-title,
    .album-meta {
        white-space: normal;
        word-break: break-word;
    }
}

/* KIS MOBIL – 550px alatt */
@media (max-width: 550px) {

    /* FIXÁLT HEADER-CENTER SZÉLESSÉG */
    .header-center {
        width: 150px; /*130*/
        min-width: 0;
        flex: 0 1 auto;
    }
	
	.thumb-grid img {
        max-width: 100px;
    }

    .hamburger {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 100000;

        flex: 0 0 auto;
        width: 48px;
        text-align: center;
    }

    .left-column {
        top: 60px;
        right: 10px;
        width: 220px;
    }

    /* FIXÁLT HEADER-CENTER SZÉLESSÉG */
    .header-center {
        width: 150px; /*130*/
        min-width: 0;
        flex: 0 1 auto;
    }

    .album-title,
    .album-meta {
        white-space: normal;
        word-break: break-word;
    }

    .album-meta {
        color: red;
    }
}

/* LIGHTBOX MOBIL */
@media (max-width: 600px) {
    .lb-prev, .lb-next {
        font-size: 32px;
    }
}

/* DESKTOP – minden 801px felett */
@media (min-width: 801px) {

    .hamburger {
        display: none !important;
    }

    .right-column {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* EXTRA NAGY DESKTOP – 1501px felett */
@media (min-width: 1501px) {

    .album-title {
        font-size: 27px;
    }

    .album-meta {
        font-size: 22px;
        color: red;
    }
}


/* LIGHTBOX MOBIL */
@media (max-width: 600px) {
    .lb-prev, .lb-next {
        font-size: 32px;
    }
}

/* MENÜ ELVÁLASZTÓ */
.menu-separator {
    border: 0;
    border-top: 2px solid #bfae8c;
    margin: 10px 0;
}

/* IMPRESSZUM OVERLAY */
.impresszum-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.impresszum-box {
    background: white;
    width: 280px;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

.impresszum-box h2 {
    margin-bottom: 15px;
    font-size: 20px;
    color: #333;
}

.impresszum-box ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.impresszum-box li {
    margin-bottom: 8px;
    font-size: 15px;
}

.imp-close-btn {
    padding: 8px 16px;
    font-size: 15px;
    border: none;
    border-radius: 6px;
    background: #bfae8c;
    cursor: pointer;
}

/* HELP OVERLAY */
.help-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.help-box {
    background: white;
    width: 300px;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

.help-box h2 {
    margin-bottom: 15px;
    font-size: 20px;
    color: #333;
}

.help-box ul {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    text-align: left;
}

.help-box li {
    margin-bottom: 10px;
    font-size: 15px;
}

.help-close-btn {
    padding: 8px 16px;
    font-size: 15px;
    border: none;
    border-radius: 6px;
    background: #bfae8c;
    cursor: pointer;
}


/* ============================
   LIGHTBOX 2.0
   ============================ */

#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#lightbox-inner {
    width: 90vw;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
    opacity: 0;
}

#lightbox-img.show {
    opacity: 1;
}

/* NYÍL GOMBOK */
.lb-prev, .lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
    user-select: none;
}

.lb-prev { left: 20px; }
.lb-next { right: 20px; }

/* BEZÁRÓ GOMB */
.lb-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 32px;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
}

/* MOBIL */
@media (max-width: 600px) {
    .lb-prev, .lb-next {
        font-size: 32px;
    }
}

/* ============================
   HAMBURGER ELTÜNTETÉSE LIGHTBOX NYITÁSKOR
   ============================ */

.lb-open .hamburger {
    display: none !important;
}
