/* Uniwersalne style dla modali */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.3s ease;
}
.modal.visible {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    text-align: left;
    background: #fff;
    padding: 1.5em;
    border-radius: 0.5em;
    max-width: 90vw;
    min-width: 25em;
    max-height: 90dvh;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation-fill-mode: both;
    display: flex;
    flex-direction: column;
}

.modal-content-fullscreen {
    text-align: left;
    background: #fff;
    padding: 1.5em;
    border-radius: 0em;
    width: 100vw;
    height: 100dvh;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation-fill-mode: both;
    display: flex;
    flex-direction: column;
}

.modal-content-iframe {
    text-align: left;
    background: #fff;
    padding: 1.5em;
    border-radius: 0.5em;
    width: 95dvw;
    height: 95dvh;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation-fill-mode: both;
    display: flex;
    flex-direction: column;
}

.modal-icon-close {
    display: block;
    text-align: center;
    width: 1.5em;
    height: 1.5em;
    rgb(255, 255, 255, 0.1);
    border-radius: 0.3em;
    border: 1px solid #FFFFFF;
    position: absolute;
    top: 50%;
    right: 0.5em;
    transform: translate(0%, -50%);
}

.modal-icon-close:hover {
    background: rgb(255, 255, 255, 0.4);
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
@keyframes modalBounce {
    0% {
        transform: scale(0.9);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}
.modal-bounce {
    animation: fadeIn 0.3s ease, modalBounce 0.5s ease;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
    }
}
.modal-closing {
    animation: fadeOut 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.modal-header {
    font-size: 1.2em;
    font-weight: bold;
    color: #000000;
    margin-bottom: 0.5em;
    flex: 0 0 auto
}
.modal-sticky {
    margin-bottom: 0em;
    word-wrap: break-word;
    flex: 0 0 auto;
}
.modal-body {
    margin-bottom: 1em;
    overflow-x: hidden;
    overflow-y: auto;
    word-wrap: break-word;
    flex: 1 1 auto;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5em;
    flex: 0 0 auto
}
.modal-button {
    padding: 0.5em 1em;
    border: none;
    border-radius: 0.3em;
    cursor: pointer;
    font-size: 1em;
}
.modal-button-primary {
    background: #007BFF;
    color: #fff;
}
.modal-button-primary:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.7;
}
.modal-button-secondary {
    background: #CCC;
    color: #333;
}

.modal-hidden {
    display: none;
}


.modal-alert {
    color: #FF0000;
}


/* MultiChoice */
.modal-option-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.modal-mc-button, .modal-mc-back-button {
    background-color: #007BFF;
    color: white;
    border: none;
    font-size: 1em;
    padding: 0.8em 1.6em;
    margin: 0.4em 0;
    border-radius: 0.4em;
    cursor: pointer;
    flex: 1;
}
.modal-mc-button:hover {
    background-color: #0056b3;
}
.modal-mc-back-button {
    background-color: #6c757d;
}
.modal-mc-back-button:hover {
    background-color: #5a6268;
}



.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    opacity: 1;
    transition: opacity 200ms;
    z-index: 1000;
    display: none;
}

/* blokowanie scroll na body gdy otwarty modal */
.modal-scroll-lock {
    overflow: hidden !important;
}
