/* === Gapfill-Verwaltungsliste → generische Klassen in base.css ===
   .item-grid, .item-card, .item-header, .item-body, .item-description,
   .item-meta, .item-actions, .load-error, .loading-overlay, .loading-spinner */

/* === Gapfill-Editor (edit_gap_text.html) === */
/* .form-section → forms.css */

.gap-text-editor {
    max-width: 800px;
    margin: 0 auto;
}

.element-controls {
    margin-bottom: 1rem;
}

.elements-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.element-item {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    background: #f8f9fa;
}

.element-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.element-type-badge {
    background: #6c757d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

.element-textarea {
    width: 100%;
    min-height: 80px;
    resize: vertical;
}

.gap-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gap-main-input {
    font-weight: bold;
}

.alt-texts {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.alt-texts input {
    font-size: 0.9rem;
}

.multiselect {
    width: 100%;
    min-height: 100px;
}

/* Distraktor-Eingabezeile */
.distractor-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* DB-ID-Badge im Modal (Wrapper, Element, Distraktor) */
.db-id-tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.db-id-tag--new {
    background: #fff3cd;
    color: #856404;
}

/* Drag-Handle und Drop-Indikatoren */
.element-header-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

.element-drag-handle {
    cursor: grab;
    user-select: none;
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
}

.element-drag-handle:hover {
    background: #e9ecef;
}

.element-drag-handle:active {
    cursor: grabbing;
}

.element-item--dragging {
    opacity: 0.4;
}

.element-item--drop-above {
    box-shadow: 0 -4px 0 0 #0d6efd;
}

.element-item--drop-below {
    box-shadow: 0 4px 0 0 #0d6efd;
}
