/* Open Graph & Social Card Generator (prefix ogp-). Left: og:* and twitter:* fields with
   inheritance toggles. Right: two generic live preview cards + readiness checks. Below: tag output. */
.ogp-card { padding: 28px; }
.ogp-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; }
.ogp-title-bar h1 { color: #fff; margin: 0; font-size: 1.4em; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; }

.ogp-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 18px; padding: 12px 14px; background: #f7f8fa; border: 1px solid #eee; border-radius: 8px; }
.ogp-toolbar-note { font-size: .82em; color: #6b7280; }
.ogp-toolbar-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.ogp-btn { background: #fff; border: 1px solid var(--site-light); border-radius: 20px; padding: 6px 14px; font: inherit; font-size: .8em; font-weight: 600; color: var(--site-dark); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: background .15s ease, color .15s ease; }
.ogp-btn:hover { background: #f0fdfa; }
.ogp-btn.ogp-solid { background: var(--site-dark); color: #fff; border-color: var(--site-dark); }
.ogp-btn.ogp-solid:hover { background: var(--site-dark-2); }
.ogp-btn.ogp-copied { background: var(--site-success-bg); border-color: var(--site-success-border); color: var(--site-success); }

.ogp-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 26px; align-items: start; }

.ogp-group { margin-bottom: 20px; }
.ogp-group-title { font-size: .78em; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #6b7280; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.ogp-group-title i { color: var(--site-accent); }

.ogp-field { margin-bottom: 12px; min-width: 0; }
.ogp-field label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 600; font-size: .88em; color: #23272f; margin-bottom: 6px; }
.ogp-field label code { font-weight: 600; font-size: .95em; color: var(--site-dark); background: none; padding: 0; }
.ogp-field input[type="text"], .ogp-field input[type="url"], .ogp-field textarea, .ogp-field select { width: 100%; min-width: 0; box-sizing: border-box; border: 1px solid #ddd; border-radius: 8px; padding: 9px 12px; font: inherit; font-size: .94em; color: #23272f; background: #fff; outline: none; }
.ogp-field textarea { min-height: 74px; resize: vertical; line-height: 1.45; }
.ogp-field input:focus, .ogp-field textarea:focus, .ogp-field select:focus { border-color: var(--site-light); }
.ogp-field input:disabled, .ogp-field textarea:disabled { background: #f7f8fa; color: #6b7280; }
.ogp-field.ogp-bad input, .ogp-field.ogp-bad textarea { border-color: #b91c1c; background: #fef2f2; }
.ogp-help { display: block; font-size: .78em; color: #6b7280; margin-top: 5px; line-height: 1.4; }
.ogp-field.ogp-bad .ogp-help { color: #b91c1c; font-weight: 600; }

.ogp-count { font-size: .74em; font-weight: 600; color: #9ca3af; white-space: nowrap; }
.ogp-count.ogp-ok { color: var(--site-success); }
.ogp-count.ogp-warn { color: #b45309; }
.ogp-count.ogp-over { color: #b91c1c; }

.ogp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.ogp-inherit { display: inline-flex; align-items: center; gap: 6px; font-size: .76em; font-weight: 600; color: var(--site-dark); cursor: pointer; user-select: none; white-space: nowrap; }
.ogp-inherit input { accent-color: var(--site-dark); width: 14px; height: 14px; cursor: pointer; margin: 0; }
.ogp-check { display: flex; align-items: center; gap: 8px; font-size: .84em; font-weight: 600; color: #374151; cursor: pointer; user-select: none; }
.ogp-check input { accent-color: var(--site-dark); width: 15px; height: 15px; cursor: pointer; margin: 0; }

/* Preview column */
.ogp-preview-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 4px; }
.ogp-preview-note { font-size: .78em; color: #6b7280; margin: 0 0 14px; line-height: 1.45; }
.ogp-pcard-label { font-size: .74em; text-transform: uppercase; letter-spacing: .06em; color: #6b7280; font-weight: 700; margin: 0 0 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ogp-active-badge { display: none; background: #fdf2f8; color: #db2777; border: 1px solid #fbcfe8; border-radius: 20px; padding: 2px 10px; font-size: .9em; text-transform: none; letter-spacing: 0; }
.ogp-active-badge.ogp-on { display: inline-block; }

.ogp-pcard { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #fff; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(20,22,31,.05); }
.ogp-img-wrap { position: relative; width: 100%; aspect-ratio: 1.91 / 1; background: #eef0f3; overflow: hidden; }
.ogp-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ogp-img-wrap img[hidden] { display: none; }
.ogp-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: #6b7280; font-size: .8em; text-align: center; padding: 14px; line-height: 1.4; }
.ogp-placeholder[hidden] { display: none; }
.ogp-placeholder i { font-size: 2em; color: #9ca3af; }
.ogp-placeholder.ogp-err { color: #b91c1c; }
.ogp-placeholder.ogp-err i { color: #dc2626; }
.ogp-pbody { padding: 12px 14px; min-width: 0; }
.ogp-pdomain { font-size: .74em; text-transform: uppercase; color: #6b7280; letter-spacing: .03em; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ogp-ptitle { font-weight: 700; color: #23272f; font-size: 1em; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ogp-pdesc { font-size: .85em; color: #4b5563; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ogp-ptitle.ogp-empty, .ogp-pdesc.ogp-empty { color: #9ca3af; font-style: italic; font-weight: 500; }

.ogp-pcard.ogp-compact { display: flex; }
.ogp-compact .ogp-img-wrap { width: 118px; min-height: 118px; flex: none; aspect-ratio: auto; border-right: 1px solid #e5e7eb; }
.ogp-compact .ogp-placeholder { font-size: .7em; padding: 8px; gap: 4px; }
.ogp-compact .ogp-placeholder i { font-size: 1.5em; }
.ogp-compact .ogp-pbody { display: flex; flex-direction: column; justify-content: center; flex: 1; }

.ogp-imginfo { font-size: .8em; color: #6b7280; margin: -8px 0 16px; line-height: 1.45; }
.ogp-imginfo.ogp-ok { color: var(--site-success); }
.ogp-imginfo.ogp-warn { color: #b45309; }
.ogp-imginfo.ogp-over { color: #b91c1c; }

.ogp-checks { list-style: none; padding: 12px 14px; margin: 0; display: grid; gap: 7px; background: #f7f8fa; border: 1px solid #eee; border-radius: 8px; }
.ogp-checks li { font-size: .83em; display: flex; gap: 9px; align-items: flex-start; color: #374151; line-height: 1.4; overflow-wrap: anywhere; }
.ogp-checks li i { width: 16px; flex: none; margin-top: 3px; }
.ogp-checks li.ogp-pass i { color: var(--site-success); }
.ogp-checks li.ogp-warn i { color: #b45309; }
.ogp-checks li.ogp-fail i { color: #b91c1c; }

/* Output */
.ogp-output { margin-top: 24px; border-top: 1px solid #eee; padding-top: 18px; }
.ogp-output-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ogp-output-head label { font-weight: 600; font-size: .92em; display: flex; align-items: center; gap: 6px; }
.ogp-output-head label i { color: var(--site-light); }
.ogp-output-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ogp-output textarea { width: 100%; min-width: 0; box-sizing: border-box; min-height: 300px; border: 1px solid #ddd; border-radius: 8px; padding: 14px 16px; font-family: "Courier New", monospace; font-size: .84em; line-height: 1.55; background: #fafbfc; color: #23272f; resize: vertical; outline: none; white-space: pre; overflow-x: auto; }
.ogp-output-foot { font-size: .8em; color: #6b7280; margin-top: 8px; }

@media (max-width: 900px) {
    .ogp-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .ogp-card { padding: 18px; }
    .ogp-title-bar { margin: -18px -18px 18px; padding: 14px 16px; }
    .ogp-title-bar h1 { font-size: 1.15em; }
    .ogp-row2 { grid-template-columns: 1fr; }
    .ogp-field label { flex-wrap: wrap; }
    .ogp-compact .ogp-img-wrap { width: 92px; min-height: 92px; }
    .ogp-output textarea { font-size: .78em; }
}
