/* Tool-specific styles for SEO Meta Tag Preview. */
.meta-tool {
  --meta-accent: #0369a1;
  --meta-accent-strong: #075985;
  --meta-accent-soft: #e0f2fe;
  --meta-line: #dbe4ee;
  display: grid;
  gap: 14px;
}

.meta-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #f8fafc;
}

.meta-network-note,
.meta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.meta-network-note {
  flex: 1 1 360px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.meta-network-note svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  color: var(--meta-accent);
}

.meta-network-note span,
.meta-actions span {
  overflow-wrap: anywhere;
}

.meta-workspace {
  display: grid;
  grid-template-columns: minmax(300px, .92fr) minmax(0, 1.08fr);
  gap: 14px;
}

.meta-panel {
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.meta-source-panel,
.meta-code-panel {
  grid-column: 1 / -1;
}

.meta-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 62px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--meta-line);
}

.meta-panel-head h2 {
  margin: 0;
  font-size: 16px;
}

.meta-panel-head p {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.meta-panel-head > svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  color: var(--meta-accent);
}

.meta-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  background: #f0f9ff;
  color: #075985;
  font-size: 11px;
  font-weight: 850;
}

.meta-source-badge svg {
  width: 15px;
  height: 15px;
}

.meta-source-body {
  padding: 14px;
}

.meta-source-body > label,
.meta-field > span {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 13px;
  font-weight: 850;
}

.meta-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.meta-url-row input {
  min-width: 0;
  min-height: 42px;
}

.meta-source-body > p {
  margin: 7px 0 0;
  color: #64748b;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.meta-editor-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  padding: 14px;
}

.meta-field {
  min-width: 0;
}

.meta-field-wide {
  grid-column: 1 / -1;
}

.meta-field input,
.meta-field textarea {
  width: 100%;
  min-height: 42px;
}

.meta-field textarea {
  min-height: 106px;
  resize: vertical;
}

.meta-field small {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 10px;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
}

.meta-field small [data-meta-count] {
  color: var(--meta-accent-strong);
  font-weight: 850;
}

.meta-preview-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.meta-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid #dbe4ee;
  border-radius: 8px;
  background: #f8fafc;
}

.meta-tabs button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.meta-tabs button[aria-selected="true"] {
  background: #fff;
  color: var(--meta-accent-strong);
  box-shadow: 0 1px 5px rgba(51, 65, 85, .16);
}

.meta-preview-stage {
  display: grid;
  align-items: center;
  min-height: 430px;
  padding: 20px;
  background: #f8fafc;
}

.meta-preview-pane {
  width: 100%;
  min-width: 0;
}

.meta-google-result {
  width: min(100%, 610px);
  margin: 0 auto;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.meta-google-source {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
}

.meta-google-source > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #f8fafc;
  color: #1d4ed8;
  font-weight: 850;
}

.meta-google-source div {
  display: grid;
  min-width: 0;
}

.meta-google-source strong,
.meta-google-source small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-google-source strong {
  color: #202124;
  font-size: 13px;
  font-weight: 500;
}

.meta-google-source small {
  color: #4d5156;
  font-size: 11px;
}

.meta-google-source svg {
  width: 18px;
  height: 18px;
  color: #5f6368;
}

.meta-google-result h3 {
  display: -webkit-box;
  margin: 12px 0 4px;
  overflow: hidden;
  color: #1a0dab;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-google-result > p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #4d5156;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.meta-social-card {
  width: min(100%, 520px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.meta-social-image {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1.91 / 1;
  overflow: hidden;
  border-bottom: 1px solid #dbe4ee;
  background: #eef2f7;
}

.meta-social-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meta-social-image > div {
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 340px;
  padding: 18px;
  color: #64748b;
  text-align: center;
  font-size: 12px;
  font-weight: 750;
}

.meta-social-image > div svg {
  width: 28px;
  height: 28px;
}

.meta-social-copy {
  padding: 12px 14px 14px;
}

.meta-social-copy small {
  display: block;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.meta-social-copy h3 {
  display: -webkit-box;
  margin: 5px 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-social-copy p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.meta-x-card {
  border-color: #cfd9e0;
}

.meta-facebook-card .meta-social-copy {
  background: #f0f2f5;
}

.meta-code-panel textarea {
  display: block;
  width: calc(100% - 28px);
  min-height: 275px;
  margin: 14px;
  resize: vertical;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre;
}

.meta-status.is-error {
  color: #b91c1c;
}

.meta-status.is-success {
  color: #047857;
}

.meta-spin {
  animation: meta-spin .8s linear infinite;
}

@keyframes meta-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 960px) {
  .meta-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .meta-source-panel,
  .meta-code-panel {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .meta-actions {
    width: 100%;
  }

  .meta-actions button {
    flex: 1 1 132px;
    justify-content: center;
  }

  .meta-url-row,
  .meta-editor-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .meta-url-row button {
    justify-content: center;
  }

  .meta-field-wide {
    grid-column: auto;
  }

  .meta-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .meta-tabs button {
    min-width: 0;
    padding-inline: 5px;
    overflow-wrap: anywhere;
  }

  .meta-preview-stage {
    min-height: 360px;
    padding: 12px;
  }

  .meta-google-result {
    padding: 14px;
  }

  .meta-code-panel textarea {
    min-height: 230px;
    font-size: 11px;
  }
}
