/* Wrapper celé popup */
#wizard-popup-wrapper {
    position: fixed;
    top: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1000px;
    max-height: 85%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    z-index: 1000;
    font-family: Arial, sans-serif;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

/* Close button v pravém horním rohu */
#wizard-popup-wrapper .popup-area-close-cross-line-wizard {
    position: absolute;
    top: 20px;
    right: 10px;
    z-index: 10;
}

#wizard-popup-wrapper .popup-area-close-cross-line-wizard img.close-window-cross {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Obsah popupu */
#wizard-popup-wrapper .popup-content {
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
    gap: 20px; /* prostor mezi progress, obsahem a footer */
}

/* Progress bar */
.wizard-progress {
    display: flex;
    justify-content: start;
    gap: 15px;
    margin-bottom: 20px; /* tady je klíčové, aby se neprekryvalo s formulářem */
    margin-top: 20px;
}

#wizard-popup-wrapper .wizard-progress .step {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #ccc;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

#wizard-popup-wrapper .wizard-progress .step.current {
    background: #2196f3;
}

#wizard-popup-wrapper .wizard-progress .step.completed {
    background: #4caf50;
}

/* Obsah kroku */
#wizard-popup-wrapper .wizard-content {
    flex: 1 1 auto;
    min-height: 150px;
}

/* Footer s tlačítky */
#wizard-popup-wrapper .wizard-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    gap: 10px;
}

.wizard-footer-left,
.wizard-footer-center,
.wizard-footer-right {
    display: flex;
    align-items: center;
}

.wizard-footer-left {
    flex: 1;
    justify-content: flex-start;
}

.wizard-footer-center {
    flex: 1;
    justify-content: center;
}

.wizard-footer-right {
    flex: 1;
    justify-content: flex-end;
    gap: 8px; /* prostor mezi next a save */
}

#wizard-popup-wrapper .wizard-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    min-width: 160px;
}

#wizard-popup-wrapper .wizard-btn.prev {
    background: #777;
    color: #fff;
}

#wizard-popup-wrapper .wizard-btn.note {
    background: #85c1e9; /* světle modrá */
    color: #fff;
}

#wizard-popup-wrapper .wizard-btn.danger {
    background: #ff0000;
    color: #fff;
    padding: 5px 10px;
}


#wizard-popup-wrapper .wizard-btn.next {
    background: #2196f3;
    color: #fff;
}

.wizard-btn.save {
    background-color: #28a745; /* tmavě zelená */
    color: #fff;
    border: none;
}

.wizard-btn.save:hover {
    background-color: #218838; /* tmavší při hover */
}

/* Mobilní úpravy */
@media (max-width: 650px) {
    #wizard-popup-wrapper {
        width: 100%;
        top: 1%;
        min-height: 85vh;
    }
    #wizard-popup-wrapper  .json-dynamic-div{
        box-shadow: none !important;
        width: 100%;
    }
    #wizard-popup-wrapper .popup-form-headline-row{
        width: initial !important;
    }
    #wizard-popup-wrapper .json-dynamic-div table .text_plus_button {
        display: flex;
        justify-content: center;
        align-content: center;
    }
    #wizard-popup-wrapper .popup-content {
        padding: 15px;
        gap: 10px;
    }
    #wizard-popup-wrapper .text_plus_button,
    #wizard-popup-wrapper .button_with_input{
        width: fit-content !important;
        border-radius: 5px;
        height: 40px;
        max-height: 40px;
        padding: 0px 10px !important;
    }
     #wizard-popup-wrapper .json-dynamic-div fieldset legend{
        margin-bottom: 15px;
     }
     #wizard-popup-wrapper .popup-content {
        padding: 30px 25px 15px 25px !important;
    }

    #myDialog{
        width: 92vw;
        min-width: 92vw !important;
    }
}

    #wizard-content tr:has(.wizard-btn),
    #wizard-content td:has(.wizard-btn) {
     width: 100%;
     max-width: 100%;
    }
@media (min-width: 650px) {
    .wizard-footer-right{
        padding-right: 15px;
    }
    #wizard-content .popup-form-headline-row {
        margin-top: -10px;
    }

}

/* Mobilní úpravy */
@media (max-width: 650px) {
    .wizard-footer {
        flex-direction: row;
        gap: 6px;
    }

    .wizard-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .wizard-footer-left,
    .wizard-footer-center,
    .wizard-footer-right {
        flex: none; /* na mobilu zabere jen potřebné místo */
    }
}



.popup-area-contact-detail-line-wizard {
    position: absolute;
    top: 10px;
    left: 15px; /* případně uprav podle potřeby */
    z-index: 2100;
}

.contact-info-btn {
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #3366bb;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.contact-info-btn:hover {
    background-color: #f5f5f5;
}


.wizard-progress .contact-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #007bff;
    background-color: white;
    color: #007bff;
    font-size: 16px;
    margin-left: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.wizard-progress .contact-info-btn:hover {
    background-color: #007bff;
    color: #fff;
}

.wizard-mobile-info-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.mobile-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.mobile-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.mobile-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* ---------- Overlay modalu ---------- */
.modal-wrapper {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: none;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 180px;
    z-index: 9999;
}

/* animace jen pro box modalu */
.modal-content {
    background: #e8f4fd;
    padding: 50px 20px 50px 20px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border-left: 5px solid #3498db;
    font-family: 'Arial', sans-serif;
}

.modal-content.show {
    animation: scaleIn 0.25s ease forwards;
}

/* ---------- Text v modalu ---------- */
.modal-text {
    font-size: 15px;
    line-height: 1.5;
    color: #1c3d5a; /* tmavě modrá barva textu */
}

/* ---------- Zavírací tlačítko ---------- */
.modal-close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #555;
    transition: color 0.2s;
}

.modal-close-btn:hover {
    color: #000;
}

.modal-wrapper.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

/* ---------- Animace při otevření ---------- */
.modal-wrapper.show {
    display: flex;
    animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Mobilní úpravy ---------- */
@media (max-width: 600px) {

    .modal-text {
        font-size: 14px;
    }

    .modal-close-btn {
        font-size: 18px;
        top: 6px;
        right: 6px;
    }
}


/* ---------- Modal pro poznámku k jednotlivému kroku ---------- */
#wizard-step-note-modal .modal-content {
    background-color: #f8f9fa; /* světlá šedá */
    border-left: 5px solid #6c757d;
    padding: 50px 20px 50px 20px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: 'Arial', sans-serif;
}

/* textarea uvnitř modalu */
#wizard-step-note-modal textarea {
    width: 95%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    resize: vertical;
    background-color: #e9ecef;
    color: #495057;
}

/* tlačítka */
#wizard-step-note-modal .modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

#wizard-step-note-modal .btn-primary {
    background-color: #0d6efd;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

#wizard-step-note-modal .btn-primary:hover {
    background-color: #0b5ed7;
}

#wizard-step-note-modal .btn-danger {
    background-color: #dc3545;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

#wizard-step-note-modal .btn-danger:hover {
    background-color: #bb2d3b;
}

/* Zavírací křížek jen jako text */
#wizard-step-note-modal .modal-close-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
    transition: color 0.2s;
}

#wizard-step-note-modal .modal-close-btn:hover {
    color: #343a40;
}

/* tlačítka modal */
#wizard-step-note-modal .btn-primary,
#wizard-step-note-modal .btn-danger {
    font-weight: bold;
    min-width: 120px;
}

/* kontejner tlačítek */
#wizard-step-note-modal .modal-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}