/* ==========================================================================
   Shared tool interface styles (QR Code Generator, Case Converter, Password Generator)
   ========================================================================== */
.gt-tool { max-width: 900px; margin: 0 auto; }
.gt-tool__shell { background: var(--gt-soft-2); border: 1px solid var(--gt-border); border-radius: 28px; padding: 0.75rem; }
.gt-tool__card { background: #fff; border-radius: var(--gt-radius); padding: 1.1rem 0.9rem 1.25rem; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03); }
.gt-tool__intro { text-align: center; color: var(--gt-muted); margin: 0.25rem auto 1.25rem; max-width: 640px; font-size: 1.02rem; line-height: 1.6; }

.gt-field { margin-bottom: 1rem; }
.gt-label { display: block; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #374151; margin: 0 0 0.4rem; }
.gt-label--h { margin: 1.4rem 0 0.6rem; }
.gt-textarea { min-height: 11rem; resize: vertical; }
textarea.gt-input { resize: vertical; }
.gt-input:focus { border-color: var(--gt-primary); }
.gt-input[aria-invalid="true"] { border-color: var(--gt-danger); }
.gt-input--color { padding: 0.25rem; height: 3rem; cursor: pointer; }
.gt-input--num { width: 6rem; text-align: center; font-weight: 800; font-size: 1.2rem; padding: 0.45rem 0.5rem; }
.gt-grid-2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
.gt-check, .gt-chip { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; font-weight: 600; }
.gt-check input, .gt-chip input { width: 1.25rem; height: 1.25rem; accent-color: var(--gt-primary); flex: none; margin: 0; }
.gt-check { margin-bottom: 1rem; }

.gt-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; margin: 1rem 0; }
.gt-actions--stack { flex-direction: column; align-items: center; }
.gt-actions--stack .gt-btn { min-width: 12rem; }

.gt-status { min-height: 1.5em; margin: 0.25rem 0 0.5rem; text-align: center; font-size: 0.95rem; font-weight: 600; color: var(--gt-muted); }
.gt-status--error { color: var(--gt-danger); }
.gt-status--ok { color: var(--gt-primary-dark); }
.gt-status--warn { color: var(--gt-warn); }

.gt-result { background: linear-gradient(180deg, #fff, var(--gt-soft-2)); border: 1.5px solid var(--gt-border-green); border-radius: 18px; padding: 1.1rem 1rem 1.2rem; margin-top: 1.25rem; }
.gt-result__head { display: flex; align-items: center; justify-content: center; gap: 0.6rem; }
.gt-result__title { margin: 0; font-size: 1.5rem; font-weight: 800; color: #4b5563; text-align: center; }
.gt-result__sub { text-align: center; color: var(--gt-muted); font-size: 0.95rem; margin: 0.2rem 0 1rem; word-break: break-all; border-bottom: 1px solid var(--gt-border); padding-bottom: 1rem; }

.gt-icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--gt-soft); color: var(--gt-primary-dark); cursor: pointer; flex: none; }
.gt-icon-btn:hover { background: var(--gt-primary); color: #fff; }
.gt-icon-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.gt-icon-btn[disabled]:hover { background: var(--gt-soft); color: var(--gt-primary-dark); }
.gt-icon-btn .gt-icon--check, .gt-btn .gt-icon--check { display: none; }
.is-done > .gt-icon--check { display: inline-block; }
.is-done > .gt-icon--copy { display: none; }
.gt-icon-btn.is-done { background: var(--gt-primary); color: #fff; }

.gt-pill { display: inline-block; background: #eceff1; color: #374151; border-radius: 999px; padding: 0.2rem 0.8rem; font-size: 0.85rem; font-weight: 700; }
.gt-pill--good { background: #d4f1df; color: #0b5a2a; }
.gt-pill--fair { background: #fdeccf; color: #7a4a00; }
.gt-pill--weak { background: #fbd9d5; color: #8f1d12; }

.gt-stats { margin: 1.1rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--gt-border); display: grid; gap: 1rem 1.25rem; }
.gt-stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gt-stats dt { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: #4b5563; }
.gt-stats dd { margin: 0.15rem 0 0; font-weight: 800; font-size: 1.15rem; word-break: break-word; }

.gt-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.gt-chip-btn, label.gt-chip { background: #fff; border: 2px solid var(--gt-border); border-radius: 999px; padding: 0.5rem 1rem; font-weight: 700; font-size: 0.98rem; line-height: 1.2; color: var(--gt-text); cursor: pointer; }
.gt-chip-btn:hover, label.gt-chip:hover { border-color: var(--gt-primary); background: var(--gt-soft-2); }
.gt-chip-btn[aria-pressed="true"] { background: var(--gt-primary); border-color: var(--gt-primary); color: #fff; }
label.gt-chip:has(input:checked) { border-color: var(--gt-primary); background: var(--gt-soft); color: var(--gt-primary-dark); }
label.gt-chip:focus-within { outline: 3px solid var(--gt-focus); outline-offset: 2px; }
.gt-chip input:focus-visible { outline: none; }

.gt-panel { border: 1px solid var(--gt-border); border-radius: 16px; margin-top: 1.25rem; overflow: hidden; background: #fff; }
.gt-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 1.1rem; background: var(--gt-soft-2); border-bottom: 1px solid var(--gt-border); }
.gt-panel__head .gt-label { margin: 0; }
.gt-panel__body { padding: 1.1rem; }
.gt-fieldset { border: 0; padding: 0; margin: 1.4rem 0 0; min-width: 0; }
.gt-fieldset legend { padding: 0; margin-bottom: 0.6rem; }

@media (min-width: 640px) {
	.gt-tool__shell { padding: 1.25rem; }
	.gt-tool__card { padding: 1.75rem 1.75rem 1.9rem; }
	.gt-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.gt-stats--2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.gt-actions--stack { flex-direction: row; justify-content: center; }
}
