/* Template Form, Preview, Repeatable Sections */

.template-form-body { display: flex; gap: var(--space-24); height: 70vh; }
.template-form-container { flex: 1; overflow-y: auto; padding-right: var(--space-16); }
.template-preview-container { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.preview-label {
    font-size: var(--font-size-base); font-weight: var(--font-weight-semibold);
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--color-text-secondary); margin-bottom: var(--space-12);
}
.template-live-preview {
    flex: 1; background: var(--color-bg-tertiary); border: 1px solid var(--color-border);
    border-radius: var(--radius-sm); overflow: auto; padding: var(--space-16);
}
.template-live-preview pre {
    font-family: var(--font-family-mono); font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed); color: var(--color-text-secondary);
    white-space: pre-wrap; word-wrap: break-word; margin: 0;
}

/* Repeatable Sections */
.repeatable-section {
    background: var(--color-bg-hover); border: 1px solid var(--color-border);
    border-radius: var(--radius-sm); padding: var(--space-16);
    margin-bottom: var(--space-12); position: relative;
}
.repeatable-section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-12); }
.repeatable-section-title { font-size: var(--font-size-md); font-weight: var(--font-weight-medium); color: var(--color-text-primary); }

.btn-remove-section {
    padding: var(--space-4) var(--space-8); background: transparent; border: none;
    color: var(--color-accent-danger); cursor: pointer; font-size: var(--font-size-base);
    border-radius: var(--radius-sm); transition: background 0.15s;
}
.btn-remove-section:hover { background: var(--color-accent-danger-bg-faint); }

.btn-add-section {
    display: flex; align-items: center; gap: var(--space-8);
    width: 100%; padding: var(--space-12); background: transparent;
    border: 2px dashed var(--color-border); border-radius: var(--radius-sm);
    color: var(--color-text-muted); font-size: var(--font-size-md);
    cursor: pointer; transition: var(--transition-fast); margin-top: var(--space-12);
}
.btn-add-section:hover { border-color: var(--color-accent-primary); color: var(--color-accent-primary); }
