/* Základní pozadí modalu (skryté) */
.custom-modal {
    display: none;  /* Skryté v základu, JS změní na flex */
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0, 0, 0, 0.6); /* Ztmavení pozadí */
    
    z-index: 99999; /* Aby byl modal nad všemi prvky na webu */
    /*backdrop-filter: blur(4px);*/ /* Jemné rozmazání pozadí */
    align-items: center;
    justify-content: center;
    padding: 20px; /* Ochrana pro malé displeje, aby modal nelezl ke krajům */
}

/* Obsahové okno modalu */
.custom-modal-content {
    background-color: #fff;
    padding: 40px 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    position: relative;
    box-sizing: border-box;

    /* Jemná animace při objevení */
    /*animation: slideIn 0.3s ease-out;*/
    animation: fadeInModal 0.3s ease-out;
}

/* Animace vyskočení okna */
/*@keyframes slideIn {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}*/

/* Zavírací křížek (x) */
.custom-modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.custom-modal-close:hover { color: #333; }

/* Zelená ikona fajfky */
.custom-modal-icon {
    width: 70px;
    height: 70px;
    background-color: #28a745;
    color: white;
    font-size: 35px;
    line-height: 70px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    font-weight: bold;
}

/* Nadpis a text */
.custom-modal-content h2 {
    color: #333;
    margin: 0 0 10px 0;
    font-size: 24px;
}

.custom-modal-content p {
    color: #666;
    margin: 0 0 25px 0;
    font-size: 16px;
    line-height: 1.5;
}

/* Tlačítko uvnitř modalu */
.custom-modal-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    /*margin-top: 20px;*/
    transition: background 0.2s;
    width: 100%; /* Roztáhne se na šířku obsahu (lze smazat, pokud chceme menší) */
}
.custom-modal-btn:hover { background-color: #218838; }

/* Červená ikona pro chybu */
.custom-modal-icon.error-mode {
    background-color: #dc3545 !important; /* Bootstrap červená */
}

/* Červené tlačítko pro chybu */
.custom-modal-btn.error-mode {
    background-color: #dc3545 !important;
}
.custom-modal-btn.error-mode:hover {
    background-color: #bd2130 !important;
}

/* Animace vyskočení modalu */
@keyframes fadeInModal {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}