
html, body {
    margin: 0;
    padding: 0;
    font-family: var(--hn-default-font-family);
}

input[type=submit]{
    padding: 1px 0 !important;
}
a:hover, a:active, a:focus {
    background-color: initial !important;
    text-decoration: none !important;
    color: initial !important;
}
#spinner {
    position: fixed; /* Přichytí k celé obrazovce */
    top: 0;
    left: 0;
    width: 100vw; /* Šířka na celou obrazovku */
    height: 100vh; /* Výška na celou obrazovku */
    background-color: rgba(0, 0, 0, 0.05); /* Poloprůhledné pozadí */
    display: flex; /* Centrování obsahu */
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Nejvyšší priorita */
    visibility: hidden; /* Na začátku skryté */
}

.loader {
    border: 8px solid #f3f3f3; /* Světle šedá */
    border-top: 8px solid #3498db; /* Modrá barva */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite; /* Rotace */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sekce nastavení */
.settings-section {
    display: flex;
    flex-direction: column; /* Zajistí, že fieldsety budou pod sebou */
    gap: 20px; /* Mezery mezi fieldsety */

}

/* Styly pro každý fieldset */
.settings-fieldset {
    padding: 20px 20px 40px 20px;
    border: none;
    background-color: #ebebf2; /* Světle šedé pozadí */
}

/* Titulek (legend) každého fieldsetu */
.settings-fieldset legend {
    font-weight: bold;
    font-size: 18px;
    padding: 0 10px;
    color: #333;
    position: relative;
    top: -22px;
    left: -30px;
}

/* Tabulka pro každou sekci */
.settings-table {
    width: 100%;
    border-collapse: collapse;
}


.settings-table th,
.settings-table td {
    padding: 10px;
    text-align: left; /* Zarovnání textu na levý okraj */
    vertical-align: middle;
    font-size: 14px;
}

/* Styly pro popis nastavení (label) */
.settings-table th {
    background-color: #878da1; /* Světle šedé pozadí pro záhlaví */
    font-weight: bold;
    color: white;
}
.settings-table tbody {
    top: 15px;
    position: relative;
}

/* Styly pro hodnoty nastavení */
.settings-table td input,
.settings-table td select,
.settings-table td .form-check-input {
    width: 100%;
    padding: 8px;
    font-size: 10px;
    border: 1px solid #ccc;
    border-radius: 5px; /* Zaoblené rohy pro formulářová pole */
    box-sizing: border-box; /* Aby padding neovlivnil šířku */
}

/* Styly pro checkbox */
.settings-table td input[type="checkbox"] {
    width: auto; /* Zaškrtávací políčko nebude roztahovat šířku */
}

/* Styly pro tlačítko pro odeslání formuláře */
.submit-container {
    margin-top: 20px;
    text-align: right; /* Zarovnání tlačítka doprava */
}


/* Styl pro form-control (standardní třída pro vstupy) */
.form-control {
    width: 100%; /* Šířka na 100%, aby to zapadlo do sloupce */
    padding: 10px;
    font-size: 1em;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.settings-wrapper {
    display: flex;
    justify-content: left;
    padding-top: 30px;       /* mezera od horního okraje stránky */
}
/* Sloupec s názvem nastavení (label) */
.setting-page-label {
    width: 60%;             /* Fixní šířka pro popis */
    vertical-align: top;    /* Zarovnání nahoru, užitečné pro vícero řádkové inputy */
    padding-right: 10px;    /* Mezírka mezi label a inputem */
}

/* Sloupec s hodnotou (input, select, checkbox, atd.) */
.setting-page-value {
    width: 40%;
    input{
        font-size: 14px !important;
    }

}

.custom_setting-page-label {
    width: 60%;             /* Fixní šířka pro popis */
    vertical-align: top;    /* Zarovnání nahoru, užitečné pro vícero řádkové inputy */
    padding-right: 10px;    /* Mezírka mezi label a inputem */
    display: table-cell !important;
}

/* Sloupec s hodnotou (input, select, checkbox, atd.) */
.custom_setting-page-value {
    width: 40%;             /* Zabírá zbytek místa */
    display: table-cell !important;

}
.setting-page-value input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: white;
    border: 2px solid gray;
    border-radius: 4px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: inline-block;
    position: relative;
    transition: all 0.2s ease;
}
.setting-page-value input[type="checkbox"]:checked {
    background-color: #007bff; /* modrá */
    border-color: #007bff;
}
.setting-page-value input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.table-control-path{
    width: 100%;
    padding-bottom: 10px;
    font-size: var(--hn-basic-text-size);
    font-weight: bold;
}
/* Skryje select2 container */
.hidden-select + .select2-container {
    display: none !important;
}

/* Skryje celý řádek tabulky obsahující tento select */
tr:has(select.hidden-select) {
    display: none !important;
}

/* Alternativně jen label a select zvlášť */
tr:has(select.hidden-select) th,
tr:has(select.hidden-select) td {
    display: none !important;
}

tr:has(input.hidden-input) {
    visibility: collapse;
}

input.hidden-input {
    position: absolute;
    left: -9999px;
}

.hiddenGroup {
    display: none;
}

.hidden {
    display: none;
}

.image-tooltip {
    position: absolute;
    display: none;
    pointer-events: none;
    z-index: 9999;
    padding: 4px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
    transition: opacity 0.2s ease-in-out;
    opacity: 0;
}

.image-tooltip img {
    max-width: 200px;
    max-height: 200px;
    display: block;
    border-radius: 2px;
}


#qr-reader {
    width: 320px !important;
    height: 320px !important;
    background: #222;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    overflow: hidden;
    padding: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qr-reader video,
#qr-reader canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 16px;
    background: #111;
}

/* === OVERLAY === */
#contactCardsContainer {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.2s ease;
}

#contactCardsContainer.active {
    display: flex;
}

/* === HLAVNÍ OBAL === */
.contact-cards-wrapper {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    padding: 50px 25px 25px; /* padding-top 50px kvůli prostoru pro křížek */
    max-height: 90vh;
    overflow-y: auto;
    max-width: 630px;
    width: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    animation: scaleIn 0.25s ease forwards;
}

/* === KŘÍŽEK NA ZAVŘENÍ === */
.contact-cards-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2100;
}
.contact-cards-close:hover {
    background-color: #f5f5f5;
}

/* === HLAVNÍ OBLAST S KONTAKTY === */
.contact-cards-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: left;
}

/* === JEDNOTLIVÁ KARTA === */
.contact-card {
    position: relative;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px;
    min-width: 250px;
    max-width: 300px;
    border: 1px solid #e0e0e0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: scaleIn 0.3s ease forwards;
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* === TEXTOVÉ STYLY === */
.contact-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 6px;
}

.contact-phone,
.contact-email  {
    display: block;
    margin: 6px 0;
    color: #3366bb;
    text-decoration: none;
    font-size: 14px;
    padding-left: 22px;
    position: relative;
}

.contact-phone:before,
.contact-email:before  {
    position: absolute;
    left: 0;
    color: #666;
}
.contact-address {
    display: block;
    margin: 6px 0;
    color: #3366bb;
    font-size: 14px;
    padding-left: 22px; /* odsazení pro ikonku */
    position: relative;
    text-decoration: none;
    line-height: 1.3; /* aby vertikálně ladilo s ikonou */
}

.contact-address::before {
    content: "\1F3E0"; /* Unicode "house" symbol 🏠 */
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px; /* stejné jako text, aby ladilo */
    color: #666;
}

.contact-phone:before { content: "📞"; }
.contact-email:before { content: "✉️"; }

.contact-phone:hover,
.contact-email:hover {
    text-decoration: underline;
    color: #2a4f99;
}

/* === SMAZACÍ TLAČÍTKO === */
.delete-contact {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #e74c3c;
    font-size: 14px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.edit-contact {
    position: absolute;
    right: 35px;
    bottom: 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #e74c3c;
    font-size: 14px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.delete-contact:hover,
.edit-contact:hover {
    background-color: #f5f5f5;
}

/* === ANIMACE === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* === RESPONSIVITA === */
@media (max-width: 768px) {
    .contact-cards-wrapper {
        width: 90%;
        padding: 50px 15px 20px;
    }

    .contact-card {
        width: 90%;
        max-width: 90%;
    }
}


/* wrapper pro zarovnání doprava v td */
td .toggle-wrapper {
    display: inline-block;
    float: right;
    position: relative;
    width: 36px;                 /* lehce širší kvůli prostoru pro jezdec */
    height: 19px;
    margin-top: 7px;
    margin-bottom: 7px;
}

/* mobilní verze – zarovnání doleva */
@media (max-width: 768px) {
    td .toggle-wrapper {
        float: left;
        margin-left: 18px;
    }
}

/* skrytý checkbox */
.toggle-wrapper input.toggle-switch {
    display: none;
}

/* pozadí toggle */
.toggle-wrapper .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;      /* neaktivní stav */
    transition: 0.3s ease;
    border-radius: 18px;
}

/* jezdec */
.toggle-wrapper .slider:before {
    position: absolute;
    content: "";
    height: 17px;
    width: 17px;
    left: 1px;                   /* trochu odsazeno od okraje */
    bottom: 1px;
    background-color: #888;      /* barva jezdce ve false */
    border-radius: 50%;
    transition: 0.3s ease;
}

/* aktivní stav */
.toggle-wrapper input:checked + label .slider {
    background-color: #ccc;
}

.toggle-wrapper input:checked + label .slider:before {
    transform: translateX(17px); /* přesně na druhý konec */
    background-color: #2196F3;   /* modrý jezdec při checked */
}





