/* ── Admin: algemene knoppen ──────────────────────────────── */

.btn-secondary {
    background: none;
    color: var(--prm-font-clr);
    border: 1px solid var(--prm-font-clr);
}

.btn-danger {
    background: #c00;
    color: #fff;
    border-color: #c00;
}

.btn-xs {
    padding: 1px 6px;
    font-size: 12px;
}

/* ── Admin: variables table ──────────────────────────────── */

.variables-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 0.5rem;
}

.variables-table th {
    text-align: left;
    border-bottom: 2px solid var(--prm-font-clr);
    padding: 6px 8px;
    font-size: 13px;
}

.variables-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.variables-table input {
    width: 100%;
    padding: 3px 6px;
    font-size: 14px;
    display: inline-block;
}

.variables-actions {
    display: flex;
    gap: 4px;
    white-space: nowrap;
}

.variables-new-row td {
    border-bottom: none;
    padding-top: 10px;
}

/* ── Admin tabs ──────────────────────────────────────────── */

.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--prm-font-clr);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 8px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    margin-bottom: -2px;
    font-family: Verdana, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-tab.active {
    color: var(--prm-font-clr);
    border-bottom-color: var(--prm-font-clr);
    font-weight: bold;
}

/* ── Admin: athlete rows ─────────────────────────────────── */

.admin-athlete-row {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.admin-athlete-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-athlete-name { font-size: 15px; }

.badge-pending {
    color: #c07000;
    font-style: normal;
    font-size: 13px;
}

.admin-athlete-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-edit-form {
    margin-top: 8px;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-edit-form label {
    margin: 6px 0 2px;
    font-size: 13px;
    min-width: unset;
    width: auto;
}

.admin-edit-form input {
    width: 100%;
    padding: 4px 8px;
    font-size: 14px;
}

/* ── Content management ──────────────────────────────────── */

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

.content-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    gap: 8px;
}

.content-list-item code {
    font-size: 13px;
    background: #f0f0f0;
    padding: 1px 5px;
    border-radius: 3px;
}

.content-list-item.dragging {
    opacity: 0.4;
}

.content-list-item.drag-over {
    border-top: 2px solid var(--prm-font-clr);
}

.drag-handle {
    cursor: grab;
    color: #aaa;
    padding: 0 6px;
    user-select: none;
    font-size: 16px;
}

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

.content-editor { margin-top: 0.5rem; }

.content-editor-meta {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 1rem;
}

.content-editor-field label {
    margin: 0 0 4px;
    font-size: 12px;
    min-width: unset;
    width: auto;
}

.content-editor-field input {
    width: 100%;
    padding: 4px 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.content-main-body {
    width: 100%;
    min-height: 120px;
    font-family: monospace;
    font-size: 13px;
    padding: 6px;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

.content-editor-actions {
    display: flex;
    gap: 8px;
    margin-top: 1rem;
    align-items: center;
}

.content-error {
    color: #c00;
    margin-top: 0.5rem;
}

/* ── Paragraph editor ────────────────────────────────────── */

.paragraph-editor { margin-bottom: 1rem; }

.paragraph-item {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    background: #fafafa;
}

.paragraph-controls {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    margin-bottom: 6px;
}

.paragraph-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    align-items: center;
}

.paragraph-level { width: 70px; padding: 4px; font-size: 14px; flex-shrink: 0; }
.paragraph-heading { flex: 1; padding: 4px 8px; font-size: 14px; }

.paragraph-body {
    width: 100%;
    min-height: 80px;
    font-family: Verdana, sans-serif;
    font-size: 14px;
    padding: 6px;
    box-sizing: border-box;
}

/* ── Athlete picker (admin) ──────────────────────────────── */

.athlete-picker { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }

.athlete-picker-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
}

.athlete-picker-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 13px;
}

.athlete-picker-search { display: flex; flex-direction: column; gap: 4px; }

.athlete-picker-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 180px;
    overflow-y: auto;
}

.athlete-picker-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
}

.athlete-picker-option:hover,
.athlete-picker-option.selected { background: #f5f5f5; }

.athlete-picker-id { display: flex; flex-direction: column; gap: 4px; }

.athlete-picker-id-row { display: flex; gap: 6px; }

.athlete-picker-input {
    width: 100%;
    padding: 4px 8px;
    font-size: 13px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .content-editor-meta { grid-template-columns: 1fr; }
    .admin-tabs { gap: 0; }
    .admin-tab { padding: 6px 12px; font-size: 12px; }
}
