/* ========== BLOCK EDITOR ========== */

.block-editor {
    max-width: 800px;
    width: 100%;
}

.block-editor-item {
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid rgba(107, 196, 184, 0.3);
    border-radius: 10px;
    margin-bottom: 4px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.block-editor-item:hover {
    border-color: rgba(107, 196, 184, 0.6);
}

.block-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: rgba(107, 196, 184, 0.08);
    border-bottom: 1px solid rgba(107, 196, 184, 0.15);
}

.block-controls-left {
    display: flex;
    gap: 4px;
}

.block-ctrl-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.15s;
}

.block-ctrl-btn:hover:not(:disabled) {
    background: #fff;
    border-color: var(--accent);
    color: var(--accent);
}

.block-ctrl-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.block-ctrl-btn.block-ctrl-delete:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.block-ctrl-btn-sm {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 1px 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
    transition: all 0.15s;
    flex-shrink: 0;
}

.block-ctrl-btn-sm.block-ctrl-delete:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

.block-type-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.block-editor-content {
    padding: 16px;
}

.block-edit-input {
    display: block;
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.block-edit-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(107, 196, 184, 0.15);
}

.block-edit-input.block-edit-title {
    font-size: 18px;
    font-weight: 600;
}

.block-edit-textarea {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    margin-bottom: 8px;
    box-sizing: border-box;
    min-height: 60px;
}

.block-edit-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(107, 196, 184, 0.15);
}

.block-add-wrapper {
    text-align: center;
    padding: 6px 0;
    position: relative;
}

.block-add-btn {
    background: transparent;
    border: 2px dashed rgba(107, 196, 184, 0.3);
    border-radius: 6px;
    padding: 6px 20px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.block-add-btn:hover {
    border-color: var(--accent);
    background: rgba(107, 196, 184, 0.05);
}

.block-type-selector {
    position: absolute;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 4px;
    z-index: 100;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: 340px;
    justify-content: center;
}

.block-type-option {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.block-type-option:hover {
    background: rgba(107, 196, 184, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.block-add-item-btn {
    background: transparent;
    border: 1px dashed rgba(107, 196, 184, 0.4);
    border-radius: 4px;
    padding: 4px 12px;
    color: var(--accent);
    font-size: 12px;
    cursor: pointer;
    margin-top: 8px;
    font-family: inherit;
    transition: all 0.15s;
}

.block-add-item-btn:hover {
    background: rgba(107, 196, 184, 0.05);
    border-color: var(--accent);
}

/* Topic grid editor */
.topic-grid-editor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.topic-cat-editor {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.topic-cat-header {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-bottom: 8px;
}

.topic-cat-header .block-edit-input {
    margin-bottom: 0;
    font-weight: 600;
}

/* FAQ editor */
.faq-item-editor {
    padding: 12px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 8px;
    position: relative;
}

.faq-item-editor .block-ctrl-btn-sm {
    position: absolute;
    top: 8px;
    right: 8px;
}

/* Steps / list items editor */
.block-list-item {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.block-list-item .block-edit-input {
    margin-bottom: 0;
    flex: 1;
}

.step-number {
    font-weight: 600;
    color: var(--accent);
    min-width: 24px;
    text-align: right;
}

