:root {
    --bg-color-green: #2c5e23;
}

/* Reset + global */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font: 1rem Helvetica;
    background-color: #f1f3ff;
}

/* Body as grid: header / main / footer */
body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    /* header / main / footer */
    min-height: 100vh;

    overflow-y: scroll;
}

a {
    text-decoration: none;
    color: #474b49;
}

/* Header + footer */
.topheader {
    background-image: url("/static/layout/header-strip.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.footer {
    background-image: url("/static/layout/header-strip.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    text-align: center;
    padding: 15px 10px;
}

/* Main content */
.strip {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 10px;
}

.container {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 5px;
    align-items: start;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
}

.body_left {
    border: 0 solid #aaa;
    background-position: left bottom;
    background-repeat: no-repeat;
    margin-bottom: 15px;
    flex-shrink: 0;
    margin-top: 5px;
}

.body_right {
    padding-top: 5px;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Typography + tables */
h1 {
    user-select: none;
    padding: 10px 20px 10px 10px;
    color: #3a3e4b;
    background-color: #fff;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 17px;
    text-transform: uppercase;
    text-align: left;
    border: 1px solid #aaa;
    border-left: 20px solid #3a3e4b;
}

table {
    border-collapse: collapse;
    width: 100%;
    border: 1px solid #ccc;
}

td {
    color: #000;
    padding: 5px;
    overflow-wrap: break-word;
    white-space: pre-line;
}

th {
    background-color: #272935b6;
    color: #fff;
    padding: 5px;
}

tr {
    color: #000;
    background-color: #fff;
    padding: 5px;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Articles */
.article {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3em;
    margin: 0 0 20px 10px;
    color: #141414;
    text-align: left;
}

.article > .header {
    width: 100%;
    display: flex;
    flex-direction: row;
    user-select: none;
    padding: 8px;
    text-align: left;
    color: #3a3e4b;
    background-color: #fff;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    border-left: 15px solid var(--bg-color-green);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.article > .article-body {
    width: 100%;
    white-space: pre-wrap;
    padding-top: 1rem;
    padding-bottom: 3rem;
}

.article > .header.parte {
    background-color: rgb(92, 92, 92);
    color: #fff;
    border-left: 15px solid #000;
}

.article > .content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;

    gap: 0.3em;
    margin: 20px 0;
    width: 100%;
}

.article > .content a {
    text-decoration: none;
    color: #474b49;
}

.article > .content a:hover {
    color: #000;
}

.article > .content > .gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article > .content > .gallery > img {
    padding: 3px;
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.article > .content .info,
.article > .content .nadpis {
    display: flex;
    align-items: flex-start;
    width: 100%;
    margin: 0.5rem 0;
}

.article > .content .info {
    font-weight: bold;
    color: #27273f;
}

.article > .content .nadpis {
    font-weight: bold;
    font-size: 1.2rem;
}

.article > .content .nadpis > img {
    height: 1.2rem;
    padding-left: 4px;
}

.article .flex {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3em;
}

.article .hidden {
    display: none;
}

.article .link {
    cursor: pointer;
}

/* Sidebar */
.strom_item {
    padding: 8px;
    background-color: #3a3e4b;
    text-transform: uppercase;
    text-align: center;
    color: #fff;
    user-select: none;
    border-bottom: 1px solid #000;
}

.strom_item.x2 {
    background-color: var(--bg-color-green);
}

.strom_item.x3 {
    background-color: #273a61;
}

.strom_item > a {
    font-weight: normal;
    color: #fff;
}

.strom_item:hover {
    z-index: 1;
    filter: brightness(1.2);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Cards */
.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(153px, 1fr));
    gap: 10px;
    padding-left: 10px;
}

.card-item {
    border: 0;
    padding: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    background: #fff;
}

.card-item .header {
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.card-item .content {
    text-align: center;
}

#pdfContainer {
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);

    width: calc(100% - 4px);
}

/* Prihlasovací box */
.login-container {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 32px 24px;
    width: 400px;
    border: 1px solid #b3b3b3;
}

/* Reset a fullscreen podpora */

/* Wrapper ktorý pokryje výšku na všetkých zariadeniach */
.admin-login {
    /*  height: 100dvh;   */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px; /* padding pre malé obrazovky */
    box-sizing: border-box;
}

.password-hidden {
    display: none;
}

/* Nadpis */
.login-container h2 {
    margin-bottom: 24px;
    text-align: center;
    font-size: 22px;
    color: #333;
}

/* Inputy */
.login-container input {
    display: block;
    width: 100%;
    padding: 14px;
    margin-bottom: 16px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: border 0.3s;
    box-sizing: border-box;
}

.login-container input:focus {
    border-color: #1a73e8;
    outline: none;
}

/* Tlačidlo */
.login-container button {
    width: 100%;
    padding: 14px;
    background-color: #1a73e8;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-container button:hover {
    background-color: #155cb0;
}

.main-container {
    background: #f8f9fa;
    border: 1px solid #aaa;
    margin-bottom: 1rem;
}

/* container for login / auth panel */
#auth-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

/* logout button */
.logoutBtn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #dc3545;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.1s ease;
}

.logoutBtn:hover {
    background: #c82333;
}

.logoutBtn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset;
}

.logoutBtn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}

/* logout button */
.pwdchangeBtnVisible {
    margin-left: auto;
    padding: 8px 16px;
    margin-right: 2rem;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #0035ee;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.1s ease,
        box-shadow 0.1s ease;
}

.pwdchangeBtnVisible:hover {
    background: #c82333;
}

.pwdchangeBtnVisible:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset;
}

.pwdchangeBtnVisible:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}








/* iba keď obsahuje preview */
#fspreview:has(.cont) {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

#fspreview .cont {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.7));
}

#fspreview .cont img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: zoom-out;

    border: 2px solid white;
}
