/* Text Repeater — page-scoped layout for the controls (tr- prefix, no globals touched). */
.tr-field { margin-bottom: 1rem; }

.tr-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}
.tr-field-sm { flex: 1 1 180px; margin-bottom: 0.5rem; }

.tr-input-box {
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 1rem;
    box-sizing: border-box;
}
.tr-input-box:focus {
    outline: none;
    border-color: var(--accent-color);
}

.tr-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0 1rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.tr-actions { margin-bottom: 1rem; }

.tr-meta {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-left: 0.5rem;
}

/* Input & output boxes: full card width, comfortable height, matches the controls. */
#tr-input,
#tr-output {
    display: block;
    width: 100%;
    box-sizing: border-box;
    min-height: 190px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-color);
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
    font-family: inherit;
    resize: vertical;
}
#tr-input:focus,
#tr-output:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Side-by-side layout (2026-08-25): input + controls on the left, result on the
   right — matches the JSON/converter tools. Stacks to one column on small screens. */
.tr-col { display: flex; flex-direction: column; }
@media (min-width: 900px) {
    .tr-split {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        align-items: stretch;
    }
    /* Let the result box grow to fill the taller (input-side) column. */
    .tr-col-output .tr-field:first-child { flex: 1 1 auto; display: flex; flex-direction: column; }
    .tr-col-output #tr-output { flex: 1 1 auto; }
}
