.q-toolbar {
    display: flex !important;
    margin: 0;
    gap: 8px;
    justify-content: flex-start;
}

.question-description {
    margin-bottom: 20px;
}

/* Attachments */
.q-attachments-box {
    margin-top: 15px;
}

.q-file-item {
    margin-bottom: 15px;
    display: block;
    width: 100%;
}

.q-file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.pe-popup {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    max-width: none;
}

/* .pe-box {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 40%;
} */

/* POPUP EDIT */
/* .pe-popup input,
.pe-popup textarea,
.pe-popup select {
    width: 100% !important;
    padding: 10px !important;
    border: 1px solid #aaa !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-family: 'Source Serif Pro', serif !important;
    box-sizing: border-box !important;
} */

body .container:has(.pe-wrapper) {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

/* Tooltip */
.q-file-delete {
    width: 28px;
    height: 28px;
    min-width: 28px;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #64748b;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, color .2s, transform .2s;
}

.q-file-delete:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: scale(1.08);
}

.q-file-delete[title] {
    position: relative;
}

.q-file-delete[title]:hover::after {
    content: attr(title);
    position: absolute;
    top: -28px;
    left: -5px;
    background: #111;
    color: #fff;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 9999;
}

@media (max-width: 768px) {
    .q-file-header {
        flex-wrap: wrap;
        gap: 6px;
    }

    .q-file-link {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
        flex: 1 1 auto;
    }

    .file-btn {
        white-space: nowrap;
        padding: 4px 8px;
        font-size: 13px;
    }
}

.admin-resizable {
    position: relative;
    display: inline-block;
}

.admin-resizable img {
    display: block;
    width: 100%;
    height: auto;
}

.resize-handle {
    position: absolute;
    cursor: se-resize;
}

.resize-handle.br {
    bottom: -7px;
    right: -7px;
}

.popup-text {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 35px;
}

.pe-back-bar {
    margin-bottom: 16px;
}

.pe-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    transition: color .2s;
}

.pe-back-link:hover {
    color: #2563eb;
}

/* NEW */
.view-solution-box {
    display: flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 20px;
    margin-bottom: 20px;
    visibility: visible !important;
    opacity: 1 !important;
}

#view-solution-btn {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    align-items: center;
    justify-content: center;
}

.q-inline-preview {
    position: relative;
    display: flex;
    align-items: flex-start;
    width: 100%;
    overflow: visible;
}

.q-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.q-image-actions {
    display: inline-flex;
    vertical-align: top;
    margin-left: 8px;
}

.q-inline-preview .inline-img {
    display: block;
    width: 350px;
    max-width: 100%;
    height: auto;
}

#view-solution-btn:disabled {
    background: #f1f5f9 !important;
    color: #a9bfd3 !important;
    border-color: transparent !important;
    opacity: 1 !important;
    cursor: not-allowed !important;
    pointer-events: none;
    box-shadow: none !important;
}

/* EDIT QUESTION POPUP */
.eq-view-grid {
    display: grid;
    grid-template-columns: minmax(0, .75fr) minmax(140px, .45fr);
    gap: 16px;
    align-items: start;
}

.eq-view-grid .eq-field {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .eq-popup-header {
        padding: 16px 18px;
    }

    .eq-popup-title {
        font-size: 18px;
    }

    .eq-popup-body {
        padding: 18px;
        max-height: calc(100vh - 165px);
    }

    .eq-view-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .eq-view-grid .eq-field {
        margin-bottom: 18px;
    }

    .eq-popup-footer {
        padding: 14px 18px;
    }
}