/* Meta Tag Generator - page styles (prefix: mtg-) */
.mtg-card { padding: 28px; }
.mtg-title-bar { background: linear-gradient(135deg, var(--site-dark) 0%, var(--site-dark-2) 100%); border-radius: 10px 10px 0 0; padding: 18px 24px; margin: -28px -28px 24px; }
.mtg-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; }

.mtg-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 24px; align-items: start; }

.mtg-group { margin-bottom: 20px; border: 1px solid #eee; border-radius: 10px; padding: 16px; background: #fff; }
.mtg-group-title { font-size: .78em; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; margin: 0 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.mtg-group-title span { display: flex; align-items: center; gap: 8px; }
.mtg-group-title i { color: var(--site-accent); }
.mtg-group.mtg-off .mtg-group-body { display: none; }

.mtg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.mtg-field { min-width: 0; }
.mtg-field.mtg-wide { grid-column: 1 / -1; }
.mtg-field label, .mtg-field .mtg-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; margin-bottom: 7px; font-size: .9em; color: #23272f; }
.mtg-field input[type="text"], .mtg-field input[type="url"], .mtg-field input[type="number"], .mtg-field select, .mtg-field textarea { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 10px 12px; font-size: .95em; font-family: inherit; color: #23272f; background: #fff; outline: none; box-sizing: border-box; }
.mtg-field textarea { min-height: 78px; resize: vertical; line-height: 1.5; }
.mtg-field input:focus, .mtg-field select:focus, .mtg-field textarea:focus { border-color: var(--site-dark); }
.mtg-field.mtg-bad input, .mtg-field.mtg-bad textarea, .mtg-field.mtg-bad select { border-color: #b91c1c; background: #fef2f2; }
.mtg-field small { display: block; color: #6b7280; font-size: .8em; margin-top: 6px; line-height: 1.45; }
.mtg-field .mtg-msg { display: none; color: #b91c1c; font-size: .8em; margin-top: 6px; }
.mtg-field.mtg-bad .mtg-msg { display: block; }
.mtg-field:disabled, .mtg-field input:disabled, .mtg-field textarea:disabled, .mtg-field select:disabled { background: #f7f8fa; color: #6b7280; cursor: not-allowed; }

.mtg-count { font-size: .76em; font-weight: 700; color: #6b7280; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mtg-count.mtg-ok { color: #15803d; }
.mtg-count.mtg-warn { color: #b45309; }
.mtg-count.mtg-over { color: #b91c1c; }

.mtg-meter { height: 6px; background: #eef0f3; border-radius: 4px; overflow: hidden; margin-top: 7px; }
.mtg-meter-fill { height: 100%; width: 0; background: #15803d; border-radius: 4px; transition: width .15s ease, background .15s ease; }
.mtg-meter-fill.mtg-warn { background: #d97706; }
.mtg-meter-fill.mtg-over { background: #b91c1c; }

.mtg-color-row { display: flex; align-items: center; gap: 8px; }
.mtg-color-row input[type="color"] { width: 42px; height: 40px; padding: 2px; border: 1px solid #ddd; border-radius: 8px; background: #fff; cursor: pointer; flex: none; }
.mtg-color-row input[type="text"] { flex: 1; }

.mtg-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.mtg-check { display: flex; align-items: flex-start; gap: 8px; font-size: .88em; color: #23272f; cursor: pointer; user-select: none; line-height: 1.4; }
.mtg-check input { accent-color: var(--site-dark); width: 16px; height: 16px; margin-top: 2px; cursor: pointer; flex: none; }
.mtg-check span small { display: block; color: #6b7280; font-size: .86em; }

.mtg-seg { display: flex; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; }
.mtg-seg-btn { flex: 1; border: none; background: #f7f8fa; color: #6b7280; font-size: .82em; font-weight: 700; padding: 10px 8px; cursor: pointer; font-family: inherit; transition: background .2s ease, color .2s ease; }
.mtg-seg-btn:not(:first-child) { border-left: 1px solid #ddd; }
.mtg-seg-btn.active { background: var(--site-dark); color: #fff; }
.mtg-seg-btn:hover:not(.active) { color: var(--site-dark); }

.mtg-switch { display: inline-flex; align-items: center; gap: 7px; font-size: .8em; font-weight: 600; color: #374151; text-transform: none; letter-spacing: 0; cursor: pointer; user-select: none; }
.mtg-switch input { accent-color: var(--site-dark); width: 15px; height: 15px; cursor: pointer; }

.mtg-output { position: sticky; top: 16px; }
.mtg-output-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mtg-output-head label { font-weight: 700; font-size: .92em; color: #23272f; display: flex; align-items: center; gap: 6px; }
.mtg-output-head label i { color: var(--site-light); }
.mtg-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mtg-btn { background: none; border: 1px solid var(--site-light); border-radius: 20px; padding: 6px 14px; font-size: .8em; font-weight: 600; color: var(--site-dark); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; transition: background .15s ease; }
.mtg-btn:hover { background: #f0fdfa; }
.mtg-btn.mtg-primary { background: var(--site-dark); color: #fff; border-color: var(--site-dark); }
.mtg-btn.mtg-primary:hover { background: var(--site-dark-2); }
.mtg-btn.mtg-ghost { border-color: #ddd; color: #6b7280; }
.mtg-btn.mtg-ghost:hover { background: #f7f8fa; color: #23272f; }
.mtg-btn.mtg-copied { background: var(--site-success-bg); border-color: #86efac; color: #15803d; }

.mtg-code { background: #23272f; color: #e5e7eb; border-radius: 10px; padding: 16px 18px; font-family: "Courier New", Consolas, monospace; font-size: .82em; line-height: 1.6; white-space: pre; overflow: auto; max-height: 560px; margin: 0; tab-size: 2; }
.mtg-code .mtg-cm { color: #9ca3af; font-style: italic; }
.mtg-code .mtg-tg { color: #7dd3fc; }
.mtg-code .mtg-at { color: #c4b5fd; }
.mtg-code .mtg-vl { color: #fde68a; }

.mtg-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mtg-pill { font-size: .74em; font-weight: 700; border-radius: 99px; padding: 4px 11px; background: #f0fdfa; color: var(--site-dark); border: 1px solid #ccfbf1; }
.mtg-pill.mtg-pill-warn { background: #fff7ed; color: #b45309; border-color: #fed7aa; }

.mtg-preview { margin-top: 18px; border: 1px solid #eee; border-radius: 10px; padding: 14px 16px; background: #fafbfc; }
.mtg-preview-k { font-size: .74em; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.mtg-preview-url { font-size: .8em; color: #374151; word-break: break-all; }
.mtg-preview-title { font-size: 1.12em; font-weight: 600; color: #1d4ed8; margin: 4px 0 2px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtg-preview-desc { font-size: .86em; color: #4b5563; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.mtg-note { font-size: .82em; color: #6b7280; margin-top: 12px; }

@media (max-width: 1000px) {
    .mtg-layout { grid-template-columns: minmax(0, 1fr); }
    .mtg-output { position: static; }
}
@media (max-width: 600px) {
    .mtg-card { padding: 18px; }
    .mtg-title-bar { margin: -18px -18px 18px; }
    .mtg-grid, .mtg-checks { grid-template-columns: minmax(0, 1fr); }
    .mtg-actions { width: 100%; }
    .mtg-btn { flex: 1; justify-content: center; }
    .mtg-code { font-size: .76em; }
}
