/**
 * Styles fuer Multi-File-Quiz-Antworten + Lightbox.
 *
 * Wird im Frontend (Quiz-Review-Seite) und im wp-admin
 * (LifterLMS-Berichte → Test-Versuch) enqueued — siehe
 * inc/llms-quiz-multi-upload.php.
 *
 * @package BricksChild
 */

/* Multi-Answer-Display im Quiz-Review */
.llms-aq-multi-answer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.75rem;
    margin: 0.5rem 0;
}
.llms-aq-multi-answer__item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    display: block;
    transition: transform 0.15s ease;
}
.llms-aq-multi-answer__item a:hover img {
    transform: scale(1.02);
}
.llms-aq-multi-answer__file {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
}
.llms-aq-multi-answer__file:hover {
    border-color: #d4af37;
}
.llms-aq-multi-answer__file i {
    color: #64748b;
}

/* Lightbox-Overlay */
body.llms-aq-lightbox-open {
    overflow: hidden;
}
.llms-aq-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: llms-aq-lightbox-fade 0.15s ease;
}
@keyframes llms-aq-lightbox-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.llms-aq-lightbox__img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    cursor: zoom-in;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease;
}
/* Zoom via transform statt max-width-Override — robust gegen
   wp-admin's `img { max-width: 100% }` und ohne Layout-Reflow. */
.llms-aq-lightbox__img.is-zoomed {
    transform: scale(2.5);
    cursor: zoom-out;
}
.llms-aq-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.75rem;
    opacity: 0.85;
}
.llms-aq-lightbox__close:hover {
    opacity: 1;
}

/* Quiz-Versuch-Review-Header (wp-admin → LifterLMS → Berichte → Tests
   → Versuch): visueller Hint, dass die Antwort-Zeile klickbar ist.
   LifterLMS' Status-Icon (orange Uhr bei pending) liegt rechts in der
   <a class="toggle-answer">; wir setzen unseren Caret-Pfeil ueber das
   Header-Element absolut, damit er nicht mit dem Icon kollidiert.

   :has() erkennt den geoeffneten Status — beim slideUp setzt jQuery
   inline `display: none` auf das .main-Element. */
.llms-quiz-attempt-question-header {
    position: relative;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-radius: 4px;
}
.llms-quiz-attempt-question-header:hover {
    background-color: rgba(0, 0, 0, 0.04);
}
.llms-quiz-attempt-question-header .toggle-answer {
    text-decoration: none;
    display: block;
    padding-left: 2rem;
}
/* Caret-Pfeil als Pseudo-Element des Headers — links vom Titel,
   damit er nicht mit dem LifterLMS-Status-Icon (rechts in der <a>)
   kollidiert.

   State-Klassen (`is-expanded`/`is-collapsed`) werden per JS in
   quiz-multi-lightbox.js gesetzt — `:has()` allein reicht nicht, weil
   LifterLMS initial kein inline `display: none` setzt. */
.llms-quiz-attempt-question-header::after {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    width: 0.7rem;
    height: 0.7rem;
    border-right: 2.5px solid #555;
    border-bottom: 2.5px solid #555;
    transition: transform 0.2s ease;
    pointer-events: none;
    /* Default: zugeklappt (Pfeil zeigt nach unten) */
    transform: translateY(-75%) rotate(45deg);
}
/* Zugeklappt → Pfeil zeigt nach unten ▼ */
.llms-quiz-attempt-question.is-collapsed .llms-quiz-attempt-question-header::after {
    transform: translateY(-75%) rotate(45deg);
}
/* Aufgeklappt → Pfeil zeigt nach oben ▲ */
.llms-quiz-attempt-question.is-expanded .llms-quiz-attempt-question-header::after {
    transform: translateY(-25%) rotate(225deg);
}
