#assistant-button[disabled],
#table-assistant-button[disabled],
#only-assistant-button[disabled],
#pdf-assistant-button[disabled] {
    opacity: .5;
}

#response-msg {
    margin-top: 50px;
    text-align: center;
    padding: 10px;
}

#response-msg.error {
    color: #dc3232;
    border: 1px solid #dc3232;
}

#response-msg.success {
    color: #28a745;
    border: 1px solid #28a745;
}

#user-msg {
    margin-top: 20px;
}

/* Το stage των εικόνων: κρατάει το flow της σελίδας, μετακινεί περιεχόμενο όταν ανοίγει */
.first-level-map-container .wp-block-group__inner-container {
    display: block;
}

/* Όλα τα figures ξεκινούν κρυφά, χωρίς να “πιάνουν” ύψος */
.first-level-map-container figure {
    max-height: 0;
    /* κλείνει το box */
    overflow: hidden;
    /* μη δείχνει περιεχόμενο */
    opacity: 0;
    /* fade out */
    transform: scale(0.98);
    /* ελαφρύ shrink */
    transition: max-height .45s ease, opacity .35s ease, transform .35s ease;
    margin: 0 auto;
    /* κεντρικό */
    width: 100%;
    text-align: center;
    /* κέντρο για περιεχόμενο */
    pointer-events: none;
}

/* Ενεργό figure: ανοίγει μέχρι 500px (ή λιγότερο αν μικρή οθόνη) */
.first-level-map-container figure.is-active {
    max-height: min(568px, 80vh);
    opacity: 1;
    transform: scale(1);
    margin: 8px auto;
    /* μικρό breathing room */
    pointer-events: auto;
}

/* Εικόνες: κεντραρισμένες, να μην κόβονται */
.first-level-map-container img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    width: auto;
    max-height: min(568px, 80vh);
    /* δεν ξεπερνά τα 500px */
    object-fit: contain;
    /* μην κόβεις */
}

/* Mobile fine-tune: χαμήλωσε το cap για μικρές οθόνες */
@media (max-width: 480px) {
    .first-level-map-container figure.is-active {
        max-height: 320px;
    }

    .first-level-map-container img {
        max-height: 320px;
    }
}

/* BODY lock όταν ανοίγει το lightbox */
.ivl-no-scroll {
    overflow: hidden;
}

/* Overlay (εμφάνιση όταν είναι ανοιχτό) */
.ivl-lightbox[aria-hidden="false"] {
    display: flex;
}

.ivl-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    /* κρυφό όταν είναι κλειστό */
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .82);
    backdrop-filter: blur(2px);
    z-index: 9999;
    padding: 16px;
    animation: ivl-fade-in .18s ease;
    overflow: hidden;
    /* default: χωρίς scroll, θα ανοίξει στο zoom */
}

/* Εικόνα μέσα στο modal: fit-to-screen */
.ivl-lightbox__img {
    width: auto;
    height: auto;
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    border-radius: 8px;
    transform: translateY(4px) scale(.995);
    transition: transform .2s ease;
    cursor: zoom-in;
    /* ένδειξη ότι γίνεται zoom */
}

.ivl-lightbox[aria-hidden="false"] .ivl-lightbox__img {
    transform: translateY(0) scale(1);
}

/* Zoomed state: φυσικό μέγεθος + pan/scroll */
.ivl-lightbox.is-zoomed {
    overflow: auto;
    /* ενεργοποίησε κύλιση για pan */
    cursor: grab;
}

.ivl-lightbox.is-zoomed .ivl-lightbox__img {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    cursor: zoom-out;
    /* ένδειξη ότι κάνει unzoom */
}

/* Κουμπί κλεισίματος */
.ivl-lightbox__close {
    position: absolute;
    top: 10px;
    right: 14px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.ivl-lightbox__close:hover {
    background: rgba(255, 255, 255, .28);
}

/* Caption (από το alt) */
.ivl-lightbox__caption {
    position: absolute;
    bottom: 14px;
    left: 0;
    right: 0;
    text-align: center;
    color: #eaeaea;
    font-size: 14px;
    padding: 0 16px;
    text-wrap: balance;
}

/* Animation */
@keyframes ivl-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Μικρές οθόνες */
@media (max-width: 480px) {
    .ivl-lightbox {
        padding: 10px;
    }

    .ivl-lightbox__caption {
        font-size: 13px;
    }
}


.user-question,
.assistant-answer {
    background-color: #f1f1f1;
    /* Light gray background */
    color: #333;
    /* Dark text color for readability */
    padding: 10px 15px;
    /* Padding around the text */
    margin-bottom: 40px;
    /* Space between messages */
    border-radius: 8px;
    /* Rounded corners */
    font-size: 14px;
    /* Text size */
    width: 70%;
    /* Limit the width of the message */
    word-wrap: break-word;
    /* Make sure long words break to the next line */
    margin-left: auto;
    max-width: fit-content;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    transition-delay: 0.1s;
}

.parsed-table {
    margin-bottom: 40px;
}

.user-question {
    background-color: transparent;
    border: 1px solid #ddd;
}


.assistant-answer {
    margin-left: 0;
}

.assistant-answering-container {
    transition: height 0.3s ease-in-out;
}

.loading-dots {
    display: inline-flex;
    font-size: 28px;
    color: #333;
    position: relative;
    top: -50px;
    align-items: end;
}

.loading-dots img {
    margin-right: 10px;
}

.loading-dots span {
    display: inline-block;
    animation: jump 0.5s infinite;
    /* Faster animation */
}

.loading-dots span:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

.qodef-vertical-form select {
    margin-bottom: 10px;
}

.qodef-vertical-form label.select-label,
.pdf-uploader {
    margin-top: 40px;
}

.pdf-uploader input {
    width: 100%;
}

.submit-the-pdf {
    display: flex;
    align-items: center;
}

.loading-spinner {
    margin-top: 12px;
}



.spinner {
    margin-left: 10px;
    margin-top: 12px;
    display: none;
}

.spinner__circle,
.delete__circle {
    position: relative;
    width: 30px;
    /* Smaller main circle */
    height: 30px;
    /* Smaller main circle */
    overflow: hidden;
    background-color: #9e9e9e;
    border-radius: 100%;
    animation: spin 1s infinite linear;
}

.spinner__circle-gradient,
.delete__circle-gradient {
    position: absolute;
    width: 34px;
    /* Larger gradient part */
    height: 34px;
    /* Larger gradient part */
    top: -15px;
    /* Center gradient relative to the smaller circle */
    left: -15px;
    background-image: linear-gradient(0deg, #57b8e0 0%, #5762e2 50%, #be8ec6 80%);
    transform: rotate(-45deg);
}

.spinner__circle-inner,
.delete__circle-inner {
    position: absolute;
    width: 20px;
    /* Smaller inner circle */
    height: 20px;
    top: 50%;
    left: 50%;
    background-color: #fff;
    border-radius: 100%;
    transform: translate(-50%, -50%);
}

.label-container {
    display: flex;
    justify-content: space-between;
}

.label-container label {
    margin-bottom: 0;
}

#pdf-files {
    margin-bottom: 0;
    position: relative;
}

div.label-container button {
    border: 1px solid #000;
    border-radius: 50%;
    margin-top: 0;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 5px;
}

div.label-container button img {
    margin: 0 !important;
    vertical-align: 0 !important;
    height: .8em !important;
    width: .8em !important;
}

#pdf-files .label-container:not(#pdf-files .deleteting-loading-container + .label-container) {
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid #9e9e9e;
}

.textarea-with-button {
    position: relative;
}

.attachment-button-container {
    position: absolute;
    left: 10px;
    bottom: 20px;
}

.attachment-button {
    border: none !important;
}

.attachment-name {
    position: relative;
    bottom: 6px;
}

#pdf-message {
    margin-top: 30px;
}

.loading-dot {
    font-size: 35px;
    color: black;
    display: inline-block;
    animation: pulse 1.2s infinite;
    text-align: center;
    margin-top: 0;
    position: relative;
    right: 10px;
    top: 5px;
}

.deleteting-loading-container {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(236, 236, 236, .4);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .1s ease-in;
}

@keyframes pulse {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}


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

@keyframes jump {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}