/*
 * Soubor: screen.css
 * Ucel: Globalni styly aplikace (knihy, kapitoly, odstavce, login, sms, modaly)
 * Autor: micha
 *
 * @version 1.0.1 2025-09-11
 * @changelog 1.0.1 2025-09-11
 *  - doplneno: layout pro logicke celky odstavcu (flex wrapper + cislo poradi)
 *  - doplneno: kotva #zaloz1_1_ajax_kapitolaCteni (sirka 90 %) pro lepsi zarovnani
 *  - doplneno: sirky u .odstavce_ajax_kapitolaCteni a jeho <p> pro stabilni radkovani
 *  - zmena: vizualni uprava tlacitka pridat (border zrusen / komentovan)
 */

/*
promenne
*/
@import url("variable/variable.css");

/*Obecne styly*/
body{
    font-family: Arial, sans-serif;
}

h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
    font-size: 80%;
    letter-spacing: 0.1rem;
}
/*Konec obecnych stylu*/

/** Vypis knih */
.obal_akce_vypisKnihy{
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: center;
    align-items: center;
}
.telo_akce_vypisKnihy{
    width: 800px;
    text-align: center;
    color: var(--font-color);
}
.buttonZalozKnihuVypisKnyhy a, .seznamKnihTable_ajax_generujVypisKnih a{
    color:var(--font-color);
    padding: 0.5rem 1rem;
    border-radius:50px;
    background: var(--bacground-button-neactive);
    text-decoration: none;
    display: inline-block; /* aby se transform aplikoval správně */
    font-weight: normal;
    position: relative; /* pro pseudo-prvek animace pozadi */
    overflow: hidden; /* schova presahujíci pozadi */
    transition:
        transform 0.2s ease-in-out,
        font-weight 0.3s ease-in-out,
        box-shadow 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* jemny stin pro 3D efekt */
}
/** Animace pozadi */
.buttonZalozKnihuVypisKnyhy a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 100%;
    background: var(--background-button-hover); /* šedé pozadí */
    z-index: -1; /* pod text */
    transition:
        width 0.3s ease-in-out,
        left 0.3s ease-in-out;
}
/* Animace tuocne pismo + zmena na bold*/
.buttonZalozKnihuVypisKnyhy a:hover{
    transform: scale(1.1);/*Po najeti mysi zvetsim o 10%*/
    font-weight: bold;/* Zmena na bold*/
}
/*Animace pozadi*/
.buttonZalozKnihuVypisKnyhy a:hover::before {
    width: 100%;
    left: 0;
}
/* Propadnuti pri kliknuti */
.buttonZalozKnihuVypisKnyhy a:active {
    transform: scale(1.05) translateY(2px); /* lehce stlaceno dolu */
    box-shadow: 0 2px 3px rgba(0,0,0,0.2); /* mensi stin pri stisku */
}

.seznamKnihTable_ajax_generujVypisKnih {
    width: 100%;
    border-collapse: collapse;
}

.seznamKnihTable_ajax_generujVypisKnih td {
    /* padding: 0.5rem; */
    border-bottom: 1px solid #ddd;
}

.seznamKnihTable_ajax_generujVypisKnih a {
    text-decoration: none;
    color: var(--font-color);
}
.seznamKnihTable_ajax_generujVypisKnih a{
    background: initial;
    box-shadow: initial;
}
.seznamKnihTableOdkazKniha_ajax_generujVypisKnih{
    padding-left: 30px !important;
    background-image: url('../img/svg/otevrena-kniha.svg') !important;
    background-repeat: no-repeat !important;
    background-size: 25px 25px !important;
    background-position: left center !important;
}

#pocetKnih_akce_vypisKnihy{
    margin-bottom: 0.5rem;
}
.obal_ajax_generujVypisKnih{
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-top: 2rem;
    align-items: center;
}
.telo_ajax_generujVypisKnih{
    width: 50%;
    text-align: start;
}
.telo_ajax_generujVypisKnih ul{
    list-style: none;
}
.telo_ajax_generujVypisKnih ul li a{
    text-decoration: none;
}
/*Formular modal pro editaci knih*/
#formUlozKnihu-response h2, #formNovyUzivatel-response h2, #formEditUzivatel-response h2, #formEditPending-response h2, #formResendPending-response h2, #formRemovePending-response h2, #formRemoveActiveUser-response h2{
    color: var(--font-color);
    font-size: 1.5rem;
}
.modalVysledekAkceUlozeniKnihy{
    line-height: 1.8rem;
    text-align: center;
    margin: 2rem;
}
#formUlozKnihu, #formNovyUzivatel, #formEditUzivatel, #formEditPending, #formResendPending, #formRemovePending, #formRemoveActiveUser{
    display: flex;
    flex-direction: column;
}
#formUlozKnihu div, #formNovyUzivatel div, #formEditUzivatel div, #formEditPending div, #formResendPending div, #formRemovePending div, #formRemoveActiveUser div{
    color:var(--font-color);
    display:flex;
    flex-direction: column;
    margin: var(--inputForm-dmargin-bottom) 0;
}
#formUlozKnihu div > label, #formNovyUzivatel div > label, #formEditUzivatel div > label, #formEditPending div > label{
    margin-bottom: var(--inputForm-dmargin-bottom);
}
#formUlozKnihu > div > input, #formNovyUzivatel > div > input, #formEditUzivatel > div > input, #formEditPending > div > input, #formEditUzivatel > div > select, #formEditPending  > div > select, #formNovyUzivatel  > div > select{
    color:var(--font-color);
    height: var(--inputFormModal-height);
    border-radius: 5px;
    border: 1px solid var(--font-color);
    width: 100%;
}
#formUlozKnihu #poradi_knihy, #formNovyUzivatel #nu_role, #formEditUzivatel #eu_role, #formEditPending #epu_role{
    height: var(--inputFormModal-height);
    width: 12ch;
    text-align: center;
    margin-bottom: var(--inputForm-dmargin-bottom);
}
/*Konec formular modal pro editaci knih*/
/* Konec vypis knih*/


/*Modal oknov pro knihy*/
.formKnihyVypisKnihy_modal, .modal-customAlert {
    display: none; /* Skryté ve výchozím stavu */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); /* Poloprůhledné pozadí */
}
.formKnihyVypisKnihy_content, .modal-customAlert-content {
    background-color: #fefefe;
    margin: 15% auto; /* Vertikální a horizontální zarovnání */
    padding: 20px;
    border: 1px solid #888;
    width: auto;
    height: fit-content;
    min-width: 30%;
    max-width: 50%;
    border-radius: 10px;
}
.formKnihyVypisKnihy_close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.formKnihyVypisKnihy_close:hover,
.formKnihyVypisKnihy_close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
#akce_vypisKnihyVypisKnih li{
    margin: 1rem 0;
}
#akce_vypisKnihyVypisKnih li span{
    display: inline-block;
    background-color: #ffb23b;
    color: #000;
    padding: 4px 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
    margin-left:1rem;
}

/* Sablona pro editaci kapoitol */
.telo_sab_editujKnihu{
    display: flex;
}
/** Pred resize 
.kapitoly_akce_editujKnihu{
    border-right: 2px solid rgba(0, 0, 0, 0.3);

    box-shadow: 5px 0px 0px rgba(0, 0, 0, 0.1);

    min-height: 97vh;
    align-content: baseline;
    width: 40%;
    text-align: left;
    margin-top: 1rem;
}
**/

/** Po resize **/
.kapitoly_akce_editujKnihu {
    position: relative;
    border-right: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 5px 0px 0px rgba(0, 0, 0, 0.1);
    min-height: 97vh;
    align-content: baseline;
    width: 20%;
    min-width: 20rem;
    text-align: left;
    margin-top: 1rem;
}
.tlacitkoZpetNaKnihy_akce_editujKnihu{
    display: inline-block;
    text-decoration: none;
    font-size: 70%;
    color: var(--font-color);
    padding-left: 22px !important;
    min-height: 1.5rem;
    line-height: 1.5rem;
    background-image: url('../img/svg/sipka-zpet.svg') !important;
    background-repeat: no-repeat !important;
    background-size: 17px 17px !important;
    background-position: left center !important;
}

.kapitoly_akce_editujKnihu .resizer {
    position: absolute;
    right: 0;
    top: 0;
    width: 10px;
    height: 100%;
    cursor: ew-resize;
    z-index: 10;
}
/** Konec po resize */

/** seznam kapitol strom**/
/*.seznamKapitol_ajax_seznamKapitolVknize li{
    list-style: none;
}*/

.seznamKapitol_ajax_seznamKapitolVknize {
    list-style: none;
    padding-left: 0;
    margin: 0;
    line-height: 1.8rem;
    /*margin-bottom: 1rem;*/
}

.seznamKapitol_ajax_seznamKapitolVknize a {
    position: relative;
    display: inline-block;
    padding-left: 30px; /* prostor pro ikonu vlevo */
    background-image: url('../img/svg/otevrena-kniha.svg');
    background-repeat: no-repeat;
    background-size: 25px 25px;
    background-position: left center;
    text-decoration: none;
    color: inherit;
}
/** Ikona pro klikani na zbaleni kapitoly */
.kapitol-icon-clickzone {
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.seznamKapitol_ajax_seznamKapitolVknize a.collapsed {
    background-image: url('../img/svg/kniha-zavrena.svg');
    background-size: 20px 20px;
}

.seznamKapitolChildren_ajax_seznamKapitolVknize{
    margin-left: 2rem;
}
.seznamKapitolChildren_ajax_seznamKapitolVknize li{
    line-height: 1.5rem;
}
/** KOnec stromu seznamu kapitol **/


#pocitadloKapitol_akce_editujKnihu{
    margin: 1rem 0;
}
.nadpisKapitoly_ajax_kapitolaCteni{
    width: 95%;
    font-size: 160%;
    font-weight: bold;
    margin-bottom: 0.5rem;
}
.nadpisKapitoly_ajax_kapitolaCteni span{
    display: inline-block;
    font-size: 60%;
}
.TextKapitol_akce_editujKnihu{
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: center;
}
#formEditaceKapitoly_akce_editujKnihu{
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pridejNovyOdstavec_p{
    width: 100%;
    text-align: center;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
}
.ulozeni_ok {/*Zvyrazneni editovaneho odstavce*/
    background-color: #d6f9db !important;
    border: 2px solid #0ef72d !important;
    border-radius: 10px;
    transition: background-color 1.5s, border-color 1.5s;
}
/* Postupne mizeni zvyraznene polozky */
.ulozeni_ok.ulozeni_ok-fade {
    background-color: transparent !important;
    border-color: transparent !important;
}
.ulozeni_err {/*Zvyrazneni editovaneho odstavce*/
    background-color: #f7c8c8 !important;
    border: 2px solid #f43030 !important;
    border-radius: 10px;
    transition: background-color 1.5s, border-color 1.5s;
}
/* Postupne mizeni zvyraznene polozky */
.ulozeni_err.ulozeni_err-fade {
    background-color: transparent !important;
    border-color: transparent !important;
}
.odstavce_ajax_kapitolaCteni{
    text-align: justify;
    padding: 0 2rem;
    width:90%;
}
.odstavce_ajax_kapitolaCteni p{
    padding: 0.5rem;
    border:2px solid white;
    width: 100%;
}
.pridatOdstavce_ajax_kapitolaCteni{
    display: block;
    width: 20px;
    height: 20px;
    background-image: url('../img/svg/plus-pridani.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    position: relative;
    /*border: 1px solid #ccc;*/
}
.pridatOdstavce_ajax_kapitolaCteni a{
    position: absolute;
    inset: 0; /* zkráceně: top: 0; right: 0; bottom: 0; left: 0; */
    display: block;
    text-decoration: none;
}
.odstavce_ajax_kapitolaCteni em{
    font-weight: 600;
    text-align: justify;
}
.logickyCelek__ajax_kapitolaCteni{
    display: flex;
    flex-direction: row;
}
.cisloLogickyCelek_ajax_kapitolaCteni{
    padding: 0.5rem;
    margin-top: 1rem;
    border: 2px solid white;
    font-size:50%;
}
#zaloz1_1_ajax_kapitolaCteni{
    width:90%;
}

.odstavec-edit{
    margin: 0 1rem;
    cursor: pointer;
}
.textarelaLabel{
    position: relative;
    width: 100%;
    height: 2rem; /* nebo jiná výška podle potřeby */
    /*display: flex;
  flex-direction: row;*/
}
.textarelaLabel .centerLabel{
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 90%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.textarelaLabel .rightGroup{
    position: absolute;
    right: 0;
    top: 90%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.textarelaLabel .labelPoradi{
    display:flex;
    flex-direction: row;
    margin-bottom: 1rem;
}
.textarelaLabel .labelPoradi .labelPoradiPopisek{
    display: flex;
    align-items: end;
    margin-right:0.5rem;
}
.labelPoradiPopisek label, .centerLabel label{
    font-weight: inherit !important;
}
.form-wrapper .EditaceOdstavceH2{
    font-size: 120%;
    margin-bottom: 0.5rem;
    margin-top: 0;
}
#formKapitola .textarea{
    width: 100%;
    margin: auto;
}
#formKapitola .textarelaLabelDiv{
    width: 100%;
    margin: 0 0rem 1rem;
}


.buttonPridatKapitolu_akce_editujKnihu a{
    text-decoration: none;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px #9b9696, -1px -1px 2px #797676;
}
.buttonPridatKapitolu_akce_editujKnihu{
    border: 1px solid #635f5f;
    background-color: #a9a5a5;
    width: 12rem;
    min-height: 3rem;
    margin: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
}
.buttonySekce_akce_editujKnihu{
    display:flex;
    flex-direction:row;
    justify-content: center;
}
.alertObal{
    display: flex;
    width: 100%;
    justify-content: center;
    margin-top: 5rem;
}
.alert{
    padding: 5rem;
    border: 1px solid red;
    background-color: #f09c9c;
    text-align: center;
}


/*Nastroj pro vkladani hromadneho textu -  toto potom ocesat - bude se vkladat do databaze*/
/* Zakladni styl textarea */
.teloForm_ajax_formKapitolaHromadne{
    display:flex;
    flex-direction: column;
    width: 100%;
}
.teloForm_ajax_formKapitolaHromadne form{
    width:100%;
}
.teloForm_ajax_formKapitolaHromadne textarea {
    width: 80%;
    height: 30rem;
    border: 1px solid #ccc;
    padding: 10px;
}

/* Styl pro simulaci stranky A4 */
.a4-page_ajax_formKapitolaHromadne {
    width: 21cm; /* Delka stranky A4 */
    height: 29.7cm; /* Vyska stranky A4 */
    margin: 10px auto; /* Automaticke zarovni na stred*/
    padding: 3.5cm; /* Okraje stranka */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); /* Stinovani okreje stranky */
    background-color: white; /* Barva pozadi stranky */
    box-sizing: border-box;
    position: relative;
    page-break-after: always; /* Zlom stranky A4 */
}

/* Formatovani text uvnitr stranky A4 */
.formatted-text_ajax_formKapitolaHromadne {
    max-width: 100%; /* Maximalni sirka textu uvnitr stranky */
    text-align: justify; /* Justifikace textu */
}

/* Styl pro odsazeni text (prvni­ radek odstavce) */
.indented_ajax_formKapitolaHromadne {
    text-indent: 40px; /* Posunuti­ prvni­ho radku o tabulator */
    margin-top: 0; /* Odstraneni­ horni­ho okraje */
    margin-bottom: 0; /* Odstraneni spodni­ho okraje */
}

/* Styl pro nadpisy */
.centered_ajax_formKapitolaHromadne {
    text-align: center; /* Zarovnani nadpisu na stred */
    font-weight: bold;
}
/*KOnec nastroje pro vkladani textu*/

/**Formular editace kapitoly a odstavcu*/
.form-wrapper {
    background-color: #f9f9f9;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.form-wrapper-odstavec{
    background-color: inherit;
    padding: inherit;
    width:100%;
    max-width: inherit;
    border-radius: inherit;
    box-shadow: inherit;
    margin: inherit;
    margin-bottom: 4rem;
}

#formKapitola > div{
    display:flex;
    flex-direction: column;
    align-items: baseline;
    width: 80%;
    margin: 0 3rem 1rem;
}
#formKapitola label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
    font-size:1rem;
}
#formKapitola input[type="text"],
#formKapitola textarea,
#formKapitola select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 14px;
}
#formKapitola textarea{
    resize: vertical;
}
#formKapitola #note{
    resize: none;        /* Zakazani manuálni zvetsovani textarea*/
}
#formKapitola .date_formKapitola, #formKapitola .date_formOdstavec{
    display: flex;
    flex-direction: inherit;
}
#formKapitola .inputDate_formKapitola, #formKapitola .inputDate_formOdstavec{
    text-align: initial;
    margin: 0 1.5rem 0 0;
}
#formKapitola .date_formOdstavec{
    display:flex;
    flex-direction: row;
    justify-content: start;
    margin: 1rem 0;
}
#formKapitola .inputDate_formOdstavec{
    display: flex;
    flex-direction: row;
    align-items: inherit;
}
#formKapitola .inputDate_formOdstavec label{
    font-weight: normal;
    margin-right: 0.5rem;
}
#formKapitola .checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-weight: normal;
    color: #444;
}
#formKapitola #order{
    width: 5rem !important;
    /*height: 3rem !important;*/
}
#formKapitola button[type="submit"], #formUlozKnihu button[type="submit"], #formNovyUzivatel button[type="submit"], #formEditUzivatel button[type="submit"], #formEditPending button[type="submit"], #formResendPending button[type="submit"],#formRemovePending button[type="submit"], #formRemoveActiveUser button[type="submit"]  {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: block;
    margin: 20px auto 0;
}

/* Modal Remove Pending – stejné jako primary, jen červené */
#formRemovePending button[type="submit"].btn--danger, #formRemoveActiveUser button[type="submit"].btn--danger{
  background-color: #dc2626 !important;  /* red-600 */
  color: #fff !important;
  border: none !important;
}

#formRemovePending button[type="submit"].btn--danger:hover, #formRemoveActiveUser button[type="submit"].btn--danger:hover{
  background-color: #b91c1c !important;  /* red-700 */
}

#formRemovePending button[type="submit"].btn--danger:active, #formRemoveActiveUser button[type="submit"].btn--danger:active{
  background-color: #991b1b !important;  /* red-800 */
}

#formKapitola button[type="submit"]:hover, #formEditUzivatel button[type="submit"]:hover, #formEditPending button[type="submit"]:hover, #formResendPending button[type="submit"]:hover, #formRemovePending button[type="submit"]:hover, #formRemoveActiveUser button[type="submit"]:hover{
    background-color: #45a049;
}

#formKapitola .hidden {
    display: none;
}
/*Konec formulare pro editaci odstavcu*/

/** bublina napoveda**/
.bubble-div {
    position: relative;
    cursor: pointer; /* pro naznačení interakce */
}

.bubble-div::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #A9A5A5;
    color: #fff;
    padding: 1rem 2rem;
    border: 1px solid #686565;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    font-size: 14px;
    z-index: 10;
    box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.25);
}

/* Na PC s myší – zobrazujeme pomocí :hover */

.bubble-div:hover::after {
    opacity: 1;
}


/* Na dotykových zařízeních – pomocí JS */
.bubble-div.active::after {
    opacity: 1;
    pointer-events: auto;
}


/*formular prihlaseni*/

.login-container {
    max-width: 420px;
    margin: 4rem auto;
    padding: 2.5rem;
    background: #ffffff;
    border: 1px solid #e0e6eb; /* přidán jemný rámeček */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2); /* zvýrazněn stín */
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
}

.login-container h2 {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    margin-bottom: 2rem;
    color: #333;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #444;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.2s;
    font-size: 1rem;
}

.form-group input:focus {
    border-color: #00b7c2;
    outline: none;
    background-color: #eefbfc;
}

.login-button {
    width: 100%;
    padding: 0.9rem;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(to right, #00c4cc, #00a3b8);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-button:hover {
    background: linear-gradient(to right, #009da8, #007f91);
}

.login-error, .edit-error, .add_user-error{
    background-color: #ffe0e0;
    color: #a94442;
    padding: 0.8rem;
    margin-bottom: 1.5rem;
    border: 1px solid #f5c2c2;
    border-radius: 6px;
    text-align: center;
}


.login-success, .edit-success, .add_user-success {
    background-color: #e0ffe4;
    color: #2e7d32;
    padding: 0.8rem;
    margin-bottom: 1.5rem;
    border: 1px solid #a5d6a7;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}


.edit-success, .add_user-success{
    animation: successShadowPulse 0.9s ease-out 1;
}

@keyframes successShadowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); /* zelenkavý glow */
    }
    60% {
        box-shadow: 0 0 0 14px rgba(34, 197, 94, 0); /* rozplyne se do ztracena */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.edit-error, .add_user-error {
    animation: errorShadowPulse 0.9s ease-out 1;
}

@keyframes errorShadowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45);   /* červený glow */
    }
    60% {
        box-shadow: 0 0 0 14px rgba(239, 68, 68, 0);  /* rozplyne se do ztracena */
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}


/*okénko ukazující přihlášeného uživatele */

/* wrapper vpravo */
.userbar{
  position: fixed;       /* nebo absolute, pokud máš header jako positioning context */
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}


.uzivatel-dropdown,
.admin-dropdown {
    position: relative;
    top: 1rem;
    right: 1rem;
    z-index: 999;
    font-family: sans-serif;
}

.uzivatel-trigger,
.admin-trigger {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 2rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.uzivatel-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: white;
    border: 1px solid #ccc;
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    min-width: 8rem;
    z-index: 9999;
}

.uzivatel-dropdown:focus-within .uzivatel-menu {
    display: block;
}

.uzivatel-menu a {
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
    display: block;
    padding: 0.25rem 0;
    text-align: center;
}

.uzivatel-menu a:hover {
    text-decoration: underline;
}





/*možnosti pro správce: */
/* menu – admin (stejné zaoblení & stín) */
.admin-menu{
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 200px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: var(--menu-shadow);
  z-index: 9999;
}
.admin-menu a{
  display: block;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}
.admin-menu a:hover{ background: #f5f5f5; }



/*form pro ověřování SMS */
/* Kontejner celého ověřovacího formuláře */
.sms-overeni-form-wrap {
    max-width: 420px;
    margin: 3rem auto;
    padding: 2rem;
    background-color: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Základní odstavec */
.sms-overeni-form-wrap p {
    font-size: 1rem;
    color: #333;
    margin-bottom: 0.2rem;
}

/* Skupiny formulářových prvků */
.form-group-sms {
    margin-bottom: 1.5rem;
}

/* Štítky */
.form-group-sms label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

/* Vstupní pole */
.form-control {
    width: 100%;
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    outline: none;
}

/* Tlačítko pro odeslání */
.btn.btn-primary {
    background-color: #007bff;
    color: #fff;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.btn.btn-primary:hover {
    background-color: #0056b3;
}

/* Chybová hláška */
.sms-error {
    background-color: #fbeaea;
    color: #b00;
    border: 1px solid #e0b4b4;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    font-size: 0.95rem;
}

/* Informační část s časem expirace */
.sms-info {
    text-align: center;
    font-size: 0.95rem;
    color: #555;
    margin-top: 1rem;
}

#sms-expirace-timer {
    font-weight: bold;
    /*color: #007bff;*/
}


.countdown-box {
    font-size: 1.5rem;
    font-weight: 600;
    color: #007bff;
    transition: color 0.4s ease;
    text-align: center;
    padding: 0.3rem 0;
}

@keyframes subtlePulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes intensePulse {
    0%, 100% {
        transform: scale(1);
        color: #c0392b;
    }
    50% {
        transform: scale(1.05);
        color: #ff0000;
    }
}

.countdown-box.warning {
    color: #e67e22 !important;
    animation: subtlePulse 1.5s ease-in-out infinite;
}

.countdown-box.danger {
    color: #c0392b !important;
    animation: intensePulse 0.8s ease-in-out infinite;
}

#sms-expirace-timer.expired {
    color: #c0392b !important;
}

.resend-btn {
    background-color: #ffffff;
    color: #007bff;
    border: 1px solid #007bff;
    border-radius: 6px;
    padding: 0.4rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    display: inline-block;
}

.resend-button-box {
    position: relative;
    display: inline-block;
}
.resend-btn-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.resend-btn:hover {
    background-color: #007bff;
    color: #ffffff;
}

.resend-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f5f5f5;
    border-color: #ccc;
    color: #aaa;
    cursor: default;
}

#resend-wrapper {
    margin-top: 1rem;
    text-align: center;
}


.cooldown-note {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

.resend-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    position: relative;
}

.resend-confirmation {
    display: none;
    margin-top: 1rem;
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
    animation: pulseFade 1.5s ease-in-out infinite;
}


@keyframes pulseFade {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.sms-error.pulse {
    animation: pulseError 1.2s ease;
}

@keyframes pulseError {
    0%   {
        background-color: #fdd;
    }
    50%  {
        background-color: #fbb;
    }
    100% {
        background-color: #fdd;
    }
}

.back-to-login {
    margin-top: 1.5rem;
    text-align: left;
}

.back-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: #007bff;
    background: none;
    border: none;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link-btn:hover {
    color: #0056b3;
    text-decoration: underline;
}

.back-link-btn .icon-left {
    stroke: #007bff;
    transition: stroke 0.3s ease;
}

.back-link-btn:hover .icon-left {
    stroke: #0056b3;
}



/**
 * Sekce: Správa uživatelů – tabulka a UI prvky (bez CSS variables)
 * Autor: Michal Hurab <michalh@mihu.cz>
 * Verze: 1.0.0 (2025-09-16)
 */

/* Kontejner stránky správy uživatelů */
.users-admin{
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  color: #1f2937;
}

/* override globálního h2 (globál má center + menší font) */
.users-admin h2{
  margin: 0;
  text-align: left;
  font-size: 1.4rem;
  letter-spacing: .01em;
  color: #333;
}

/* Hlavička nad tabulkou (nadpis vlevo, akce vpravo) */
.users-admin__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0 1rem;
}

.users-admin__title h2{ margin: 0 0 .25rem 0; }
.users-admin__count{
  font-size: .95rem;
  color: #555;
  opacity: .9;
}

.users-admin__actions{
  align-items: center;
  gap: .75rem;
}

/* Pilulkové tlačítko – stejný look&feel jako .buttonZalozKnihuVypisKnyhy a */
.users-admin .btn-pill{
  color: var(--font-color);
  padding: .5rem 1rem;
  border-radius: 50px;
  background: var(--bacground-button-neactive);
  text-decoration: none;
  display: inline-block;
  font-weight: normal;
  position: relative;
  overflow: hidden;
  transition:
    transform .2s ease-in-out,
    font-weight .3s ease-in-out,
    box-shadow .2s ease-in-out;
  box-shadow: 0 4px 6px rgba(0,0,0,.1);
}
.users-admin .btn-pill::before{
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 0;
  background: var(--background-button-hover);
  z-index: -1;
  transition: width .3s ease-in-out, left .3s ease-in-out;
}
.users-admin .btn-pill:hover{ transform: scale(1.1); font-weight: bold; }
.users-admin .btn-pill:hover::before{ width: 100%; left: 0; }
.users-admin .btn-pill:active{
  transform: scale(1.05) translateY(2px);
  box-shadow: 0 2px 3px rgba(0,0,0,.2);
}

/* Hlášky jen pro tuhle sekci (nechává globální .alert být) */
.users-admin .alert{
  border: 1px solid;
  border-radius: .75rem;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
}
.users-admin .alert--error{
  background: #fff1f2;
  border-color: #fecaca;
  color: #b91c1c;
  text-align: center;
}

/* Scrollovatelný obal tabulky */
.users-admin .table-wrap{
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: .75rem;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}



/* Tabulka */
.users-admin .users-table{
  width: 100%;
  min-width: 900px;               /* na úzkých displejích povolí horizontální scroll */
  border-collapse: separate;
  border-spacing: 0;
  font-size: .95rem;
}

.users-table tr th{
    text-align: center !important;
}

.col-role, .col-langs
{
    text-align: center;
}

.users-admin .users-table thead th{
  position: sticky;
  top: 0;
  background: #f8fafc;
  color: #1f2937;
  text-align: left;
  font-weight: 600;
  padding: .8rem .9rem;
  border-bottom: 1px solid #e2e8f0;
  z-index: 1;
}
.users-admin .users-table th:first-child{ border-top-left-radius: .75rem; }
.users-admin .users-table th:last-child { border-top-right-radius: .75rem; }

.users-admin .users-table td{
  padding: .7rem .9rem;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: middle;
  background: #fff;
}
.users-admin .users-table tbody tr:hover td{ background: #fafafa; }

.users-admin .users-table .empty{
  text-align: center;
  color: #6b7280;
  padding: 2rem 1rem;
  background: #fff;
}

/* Tagy jazyků */
.users-admin .tag, #formResendPending-response .tag, #formRemovePending-response .tag{
  display: inline-block;
  padding: .2rem .55rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #f9fafb;
  font-size: .85rem;
  color: #1f2937;
  margin: .12rem .3rem .12rem 0;
  white-space: nowrap;
}

/* Role badge */
.users-admin .role-badge{
  display: inline-block;
  font-weight: 600;
  font-size: .85rem;
  padding: .18rem .55rem;
  border-radius: .5rem;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  text-transform: lowercase;
}
.users-admin .role-spravce{     color:#065f46; background:#ecfdf5; border-color:#a7f3d0; }
.users-admin .role-prekladatel{ color:#1e40af; background:#eff6ff; border-color:#bfdbfe; }
.users-admin .role-uzivatel{    color:#6b7280; background:#f3f4f6; border-color:#e5e7eb; }

/* Sloupce – drobné typografické úpravy */
.users-admin .col-actions{ width:1%; white-space:nowrap; }
.users-admin .col-id{ font-variant-numeric: tabular-nums; color:#374151; }
.users-admin .col-email a{ color:#2563eb; text-decoration:none; }
.users-admin .col-email a:hover{ text-decoration:underline; }
.users-admin .col-phone{ color:#374151; }
.users-admin .col-username{ font-weight:600; }

/* Sekundární (ghost) button – zůstává pro akce v tabulce */
.users-admin .btn{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  padding:.45rem .75rem;
  border-radius:.5rem;
  text-decoration:none;
  font-weight:600;
  border:1px solid transparent;
  transition:transform .06s ease, box-shadow .15s ease, background .2s ease, color .2s ease;
  cursor:pointer;
}
.users-admin .btn:active{ transform: translateY(0); }
.users-admin .btn--ghost{
  background:#fff;
  color:#0369a1;
  border-color:#cfe9f8;
  border-width:1px;
  border-style:solid;
}
.users-admin .btn--ghost:hover{ background:#eef7fe; }

/* Responzivní doladění */
@media (max-width: 768px){
  .users-admin__header{
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }
  .users-admin__title h2{ text-align: center; }
  .users-admin__count{ text-align: center; }
  .users-admin__actions{ justify-content: center; }
}

/* Users admin – vycentrovaná hero hlavička */
.users-admin__hero{
  display:flex; flex-direction:column; align-items:center; gap:.6rem;
  margin:1.25rem 0 1rem;
}
.users-admin__title-box{
  background:#fff; 
  padding:.8rem 1.2rem; 
}
.users-admin__title-box h2{
  margin:0; text-align:center; font-size:1.5rem; letter-spacing:.01em; color:#111827;
}
.users-admin__hero .users-admin__count{ 
    font-size:.95rem; 
    color:#555; 
    opacity:.9; 
    text-align:center; }
.users-admin__cta{ 
 margin-top:.2rem; 
}
.users-admin__cta .btn-pill{ 
    padding:.55rem 1.1rem; 
    border-radius:50px; 
}

/* Akční sloupec: dvě tlačítka vedle sebe */
.users-admin .col-actions{

  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  white-space: nowrap;
}

/* Malé ikonové tlačítko */
.users-admin .btn--icon{
  width: 2rem;
  height: 2rem;
  padding: .4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  line-height: 1;
  font-size: 1rem;
}

/* Koš – stejně velké ghost tlačítko jako Upravit, jen danger barvy */
.users-admin .btn--danger{
  background:#fff;
  color:#b91c1c;
  border-color:#fca5a5;   /* červený rámeček */
}
.users-admin .btn--danger:hover{
  background:#fff7f8;     /* jemné růžové při hoveru */
}

.pw-wrap{ position:relative; }
  .pw-toggle{
    position:absolute; right:.5rem; top:50%; transform:translateY(-50%);
    background: none; border: none; cursor: pointer; padding: .2rem; color: #666;
  }
  .pw-toggle:focus{ outline:2px solid #00b7c2; outline-offset:2px; border-radius:4px; }
  .form-control.invalid{ border-color:#f43030 !important; }
  
 .is-invalid { 
     border-color: #d33 !important; 
 }
 
.field-error { 
    color: #d33; 
    font-size: .9em; 
    margin-top: .25rem; 
}

.tag--green-pending { 
    background-color:#2ecc71 !important; 
    color:#fff !important; 
}
.tag--red-expired {
    background-color:#e74c3c !important; 
    color:#fff !important; 
}


#formNovyUzivatel .telefon-flex {
  display: flex !important;      /* přepíše globální display:flex-direction:column */
  flex-direction: row !important;
  align-items: center;
  gap: 0.5em;
}

#formNovyUzivatel .telefon-flex input {
  color: var(--font-color);
  height: var(--inputFormModal-height);
  border-radius: 5px;
  border: 1px solid var(--font-color);
  padding: 0 0.5em;
  box-sizing: border-box;
}

#formNovyUzivatel #nu_tel_prefix {
  width: 6ch;
  flex-shrink: 0;
  text-align: center;
}

#formNovyUzivatel #nu_tel {
  flex: 1;
}



/* Základní blok */
.ava {
  box-sizing: border-box;
  padding: 12px 14px;
  text-align: center;
  border-radius: 10px;
  font-size: 14.5px;
  line-height: 1.35;
  margin: 2rem 3rem 2rem 2rem;
  padding: 1rem;
}
  


/* Varianta: chyba */
.ava--error {
  background: #fff5f5;
  border-color: #ef4444;
  color: #7f1d1d;
}

/* Volitelně: drobný detail (debug) */
.ava__detail {
  margin-top: 6px;
  opacity: .9;
  font-size: 0.92em;
}

/* Varianta: uspech */
.ava--success {
  background: #f0fdf4;   /* zelene-50 */
  border-color: #22c55e; /* zelene-500 */
  color: #14532d;        /* zelene-900 */
}


/* 5) Jemné srovnání textů v modalu */
#formResendPending-response p, #formRemovePending-response p, #formRemoveActiveUser-response p {
  margin: .75rem 0;
  color: var(--font-color);
}


/* Druhý odstavec (řádek se statusem) – zarovnání do řádku s mezerou */
#formResendPending-response p:nth-of-type(2), #formRemovePending-response p:nth-of-type(2), #formRemoveActiveUser-response p:nth-of-type(2) {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.modal-actions-row-ResendEmailu, .modal-actions-row-Remove-Pending, .modal-actions-row-Remove-Active {
  margin-top: 1rem;
  display: flex;
  gap: .5rem;
}




/* Aktuálně přihlášený uživatel v tabulce správy uživatelů */
.users-admin .users-table .user-me {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .15rem .7rem;
  border-radius: 999px;
  background: #f0f9ff;
  box-shadow:
    0 0 0 1px rgba(37,99,235,.16),
    0 3px 8px rgba(15,23,42,.12);
}

.users-admin .users-table .user-me__icon {
  font-size: .8rem;
  color: #22c55e;   /* zelená šipka */
  margin-right: .05rem;
}

.users-admin .users-table .user-me__name {
  font-weight: 600;
  color: #111827;
}

.users-admin .users-table tr.user-row--me td {
    background-color: #f5f9ff; 
}

/* Zpět na přehled knih – vlevo nahoře, podobně jako userbar vpravo */
.users-admin__back-link{
  position: fixed;
  top: 1.68rem;          /* místo 12px */
  left: 1rem;         /* místo 12px */
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 2rem;
  background: #ffffff;
  border: 1px solid #e0e6eb;
  box-shadow: 0 0.3rem 0.6rem rgba(0,0,0,0.12);
  font-size: 0.9rem;
  color: var(--font-color);
  text-decoration: none;
}

.users-admin__back-link:hover{
  background: #f9fafb;
}

.is-invalid {
    border-color: #e11d48 !important; /* sytější červená */
}

/* kratky cerveny pulse pro chybove pole */
.field-error-pulse {
    animation: inputErrorPulse 0.9s ease-out 1;
}

@keyframes inputErrorPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.65);
        background-color: #ffffff;
    }
    40% {
        box-shadow: 0 0 0 6px rgba(225, 29, 72, 0);
        background-color: #fef2f2;
    }
    100% {
        box-shadow: 0 0 0 0 rgba(225, 29, 72, 0);
        background-color: #ffffff;
    }
}


