/*
 * GPL Canonical Tag Generator — tool-only UI.
 * Shared chrome (tokens, .gpl-tool shell, base reset, card panel, generator layout,
 * headings, icon badge, blocks, labels, field messages, collapsible card, action
 * buttons, notice, empty state, code editor) lives in the gpl-child theme under
 * "3. Tool shell", and the pills come from the shared .gpl-tag component; neither is
 * duplicated here. Inputs, selects and textareas also come from the theme.
 */
.gplctg-tool .gplctg-svg { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; flex-shrink: 0; }
.gplctg-heading__icon .gplctg-svg { width: 18px; height: 18px; }
.gplctg-tool .gpl-tool__empty-icon .gplctg-svg { width: 24px; height: 24px; }
.gplctg-button-icon { display: inline-flex; color: inherit; font-size: 13px; }

/* Hidden default button that stops Enter from submitting the form (see the markup) */
.gplctg-tool .gplctg-no-submit { display: none !important; }

/* URL box: theme font and size like the other URL tools; one URL per row, long ones scroll */
.gplctg-tool .gplctg-field textarea[data-gplctg="urls"] { min-height: 190px; white-space: pre; overflow-wrap: normal; overflow-x: auto; }

/* Load Example / Clear on the left, counters on the right */
.gplctg-input-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 0.75em; }
.gplctg-input-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gplctg-tool .gplctg-count { gap: 4px; }
.gplctg-tool .gplctg-count strong { font-weight: 700; }

.gplctg-tool .gplctg-advanced { margin-bottom: 0; }
.gplctg-tool .gplctg-field-hint { margin: 0.5em 0 0; }

/* Output label above the editor (type from the shell's .gpl-tool__block-title) */
.gplctg-tool .gplctg-auto { display: flex; align-items: center; gap: 8px; }
.gplctg-tool .gplctg-editor-frame,
.gplctg-tool .gplctg-editor-frame textarea.gpl-tool__code { min-height: 240px; }
.gplctg-tool textarea.gplctg-code-output { background: transparent; cursor: text; }
.gplctg-tool .gplctg-summary,
.gplctg-tool .gplctg-note { margin: 0.75em 0 0; }

/* Canonical hint note: icon + text */
.gplctg-tool .gplctg-note { display: flex; gap: 8px; align-items: flex-start; }
.gplctg-note .gplctg-button-icon { margin-top: 2px; color: var(--gpl-tool-blue); font-size: 15px; }

/* Needs review (red) / Check before using (amber) */
.gplctg-report { margin-top: 1.25em; }
.gplctg-tool .gplctg-list { max-height: 260px; margin: 0; padding: 0; overflow-y: auto; list-style: none; }
.gplctg-tool .gplctg-list li { position: relative; margin: 0 0 0.45em; padding-left: 16px; color: var(--gpl-tool-label); font-size: 0.875rem; line-height: 1.45; overflow-wrap: anywhere; }
.gplctg-tool .gplctg-list li::before { content: ""; position: absolute; top: 0.5em; left: 2px; width: 7px; height: 7px; border-radius: 50%; }
.gplctg-tool .gplctg-list li strong { color: var(--gpl-tool-ink); font-weight: 600; }
.gplctg-tool .gplctg-list li code { padding: 1px 5px; border: 1px solid var(--gpl-tool-line); border-radius: 4px; background: var(--gpl-tool-surface-hover); color: var(--gpl-tool-ink); font-family: var(--gpl-tool-mono); font-size: 12px; }
.gplctg-tool .gplctg-list--review li::before { background: var(--gpl-tool-red); }
.gplctg-tool .gplctg-list--warnings li::before { background: #e4a705; }
.gplctg-tool .gplctg-list--changes li::before { background: var(--gpl-tool-blue); }

/* What was changed: closed <details>, title row is the toggle */
.gplctg-tool .gplctg-changes-summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.gplctg-tool .gplctg-changes-summary::-webkit-details-marker { display: none; }
.gplctg-tool .gplctg-changes-chevron { display: inline-flex; margin-left: auto; transition: transform 0.2s ease; }
.gplctg-tool .gplctg-report--changes[open] .gplctg-changes-chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .gplctg-tool .gplctg-changes-chevron { transition: none; } }

@media (max-width: 640px) {
	.gplctg-input-bar { flex-direction: column; align-items: stretch; }
	.gplctg-input-actions .gpl-tool__action-btn { flex: 1 1 auto; justify-content: center; }
	.gplctg-tool .gplctg-editor-frame,
	.gplctg-tool .gplctg-editor-frame textarea.gpl-tool__code { min-height: 200px; }
}
