/* Open Graph checker (/og/). Loaded after style.css and uses its colours.
   After changing this file, raise the ?v= number in og/index.html. */

/* Good is our teal; to improve and problem are the same lightness and
   strength as the teal (OKLCH), turned to orange and red on the colour wheel */
:root {
  --ok: #008484;
  --warn: #996731;
  --bad: #a35c57;
  --card-radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ok: #2bb3b3;
    --warn: #cd8f4f;
    --bad: #da827b;
  }
}

.og-hero { padding: 64px 0 48px; }
.og-hero .lead { margin-bottom: 24px; }

/* URL form */
.og-form { max-width: 720px; }
.og-label { display: block; font-weight: 600; margin-bottom: 6px; }
.og-row { display: flex; gap: 10px; }
.og-row input { flex: 1; min-width: 0; }
.og-row .button { border: 0; font: inherit; font-weight: 600; cursor: pointer; }

.og-form input,
.og-edit input,
.og-edit textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.og-edit textarea { resize: vertical; }
textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }

.og-error { color: var(--bad); font-weight: 600; margin: 16px 0 0; }
/* Example sites and what the report includes, under the URL box */
.og-try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; color: var(--muted); font-size: 15px; }
.og-chip {
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 14px;
  text-decoration: none; background: var(--bg);
}
.og-chip:hover { border-color: var(--accent); }
.og-includes-title {
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  margin: 40px 0 12px;
}
.og-includes { margin: 0 0 12px; }
.og-free { color: var(--muted); font-size: 15px; margin: 0; }

/* Results */
.og-results { padding-top: 40px; }
.og-fetched-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 32px; }
.og-fetched { color: var(--muted); font-size: 15px; margin: 0; overflow-wrap: anywhere; min-width: 0; }
.og-again {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--bg); color: var(--accent); border: 1px solid var(--accent); border-radius: 8px; padding: 6px 14px;
}
.og-previews > .og-hint { margin: -8px 0 24px; }

.og-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: 40px;
  align-items: start;
}
@media (max-width: 900px) {
  .og-layout { grid-template-columns: minmax(0, 1fr); }
}

.og-platform { margin-bottom: 32px; max-width: 560px; }
.og-platform h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}

.og-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  overflow: hidden;
}

/* Images in the previews */
.og-img { position: relative; background: var(--bg-soft); overflow: hidden; }
.og-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.og-wide { aspect-ratio: 1.91 / 1; }
.og-square { aspect-ratio: 1 / 1; width: 130px; flex: none; }
.og-noimg { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.og-noimg img { display: none; }
.og-img.og-broken img { display: none; }
.og-img.og-broken::after {
  content: "Image does not load";
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--bad); font-size: 14px;
}

.og-host { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.clamp1, .og-fb-title, .og-li-title, .og-x-title, .og-wa-title, .og-x-label {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden;
}
.og-g-desc, .og-li-title, .og-discord-desc, .og-slack-desc, .og-x-desc, .og-wa-desc {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.og-fb-desc { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }

/* Google */
.og-google { padding: 16px 18px; }
.og-g-site { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 14px; line-height: 1.3; }
.og-g-icon { border-radius: 50%; background: var(--bg-soft); border: 1px solid var(--line); padding: 3px; object-fit: contain; }
.og-g-name { display: block; color: var(--text); }
.og-g-crumb { display: block; color: var(--muted); font-size: 13px; }
.og-g-title { color: var(--accent); font-size: 20px; line-height: 1.3; margin-bottom: 4px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }
.og-g-desc { color: var(--muted); font-size: 14px; line-height: 1.55; }

/* Facebook */
.og-fb-body { padding: 10px 14px 12px; background: var(--bg-soft); border-top: 1px solid var(--line); }
.og-fb-title { font-weight: 600; font-size: 16px; line-height: 1.3; margin: 2px 0; }
.og-fb-desc { color: var(--muted); font-size: 14px; line-height: 1.4; }

/* X */
.og-x { border-radius: 16px; }
.og-x-wrap { position: relative; }
.og-x-label {
  position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 24px);
  background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 13px; padding: 1px 8px; border-radius: 4px;
}
.og-x-from { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.og-x-small { display: flex; }
.og-x-small .og-img { border-right: 1px solid var(--line); }
.og-x-body { padding: 12px 14px; min-width: 0; display: flex; flex-direction: column; justify-content: center; font-size: 15px; line-height: 1.35; }
.og-x-desc { color: var(--muted); }

/* LinkedIn */
.og-li { border-radius: 8px; }
.og-li-body { padding: 10px 14px; border-top: 1px solid var(--line); }
.og-li-title { font-weight: 600; font-size: 15px; line-height: 1.35; margin-bottom: 2px; }

/* Slack */
.og-slack {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--card-radius);
  padding: 12px 16px 16px; font-size: 15px; line-height: 1.45;
}
.og-slack-site { display: flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 2px; }
.og-slack-site img { border-radius: 3px; }
.og-slack-title { color: var(--accent); font-weight: 600; }
.og-slack-desc { margin-bottom: 8px; }
.og-slack-img { aspect-ratio: 1.91 / 1; border-radius: 8px; }

/* Discord */
.og-discord {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--card-radius); padding: 12px 16px 16px; font-size: 14px; line-height: 1.4;
}
.og-discord-site { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.og-discord-title { color: var(--accent); font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.og-discord-desc { margin-bottom: 12px; }
.og-discord-img { aspect-ratio: 1.91 / 1; border-radius: 8px; }

/* WhatsApp */
.og-wa { background: var(--bg); border: 1px solid var(--line); border-radius: var(--card-radius); overflow: hidden; }
.og-wa-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.og-wa-body { padding: 10px 14px; font-size: 14px; line-height: 1.35; }
.og-wa-title { font-weight: 600; }
.og-wa-desc { color: var(--muted); margin: 2px 0; }
.og-wa-link { color: var(--accent); font-size: 14px; padding: 8px 14px 10px; overflow-wrap: anywhere; }

/* Side column: checks, edit form, code */
.og-side { position: sticky; top: 16px; }
@media (max-width: 900px) { .og-side { position: static; } }
.og-side h2 { font-size: 22px; }
.og-side h2 + p, .og-hint { color: var(--muted); font-size: 15px; }

.og-score { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.og-pill { border: 1px solid currentColor; border-radius: 999px; padding: 1px 10px; font-size: 13px; font-weight: 600; }
.og-pill.og-ok { color: var(--ok); }
.og-pill.og-warn { color: var(--warn); }
.og-pill.og-bad { color: var(--bad); }

.og-checks { list-style: none; padding: 0; margin: 0 0 40px; font-size: 15px; }
.og-checks li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); line-height: 1.45; overflow-wrap: anywhere; }
.og-checks li > div { min-width: 0; }
.og-fix { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.og-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; }
.og-checks .og-ok .og-dot { background: var(--ok); }
.og-checks .og-warn .og-dot { background: var(--warn); }
.og-checks .og-bad .og-dot { background: var(--bad); }

.og-visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.og-edit { display: grid; gap: 6px; margin-bottom: 40px; }
.og-edit label { font-weight: 600; font-size: 15px; margin-top: 8px; display: flex; justify-content: space-between; }
.og-count { font-weight: 400; color: var(--muted); font-size: 13px; }
.og-count.og-over { color: var(--warn); font-weight: 600; }

.og-code-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.og-code-head h2 { margin: 0; }
.og-copy {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  background: var(--bg); color: var(--accent); border: 1px solid var(--accent); border-radius: 8px; padding: 4px 14px;
}
.og-code {
  margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--card-radius);
  padding: 14px; font-size: 13px; line-height: 1.5; overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere;
}
.og-code code { background: none; border: 0; padding: 0; font-size: inherit; }

/* Key tags */
.og-tags-title { margin-top: 48px; }
.og-keys {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.og-key {
  background: var(--bg);
  border: 1px solid var(--ok);
  border-radius: var(--card-radius);
  padding: 16px 18px;
  min-width: 0;
}
.og-key.og-note { border-color: var(--line); }
.og-key.og-warn { border-color: var(--warn); }
.og-key.og-bad { border-color: var(--bad); }
.og-key h3 { margin: 0 0 4px; font-size: 16px; }
.og-key h3 code { font-size: inherit; background: none; border: 0; padding: 0; }
.og-key-what { color: var(--muted); font-size: 14px; line-height: 1.45; margin: 0 0 10px; }
.og-key-value { font-weight: 600; font-size: 15px; line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.og-key-missing { font-size: 15px; line-height: 1.45; margin: 0; color: var(--muted); }
.og-key.og-warn .og-key-missing { color: var(--warn); font-weight: 600; }
.og-key.og-bad .og-key-missing { color: var(--bad); font-weight: 600; }

/* All tags */
.og-all summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: 12px; }
.og-table-wrap { overflow-x: auto; background: var(--bg); border: 1px solid var(--line); border-radius: var(--card-radius); }
.og-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.og-table th, .og-table td { text-align: left; vertical-align: top; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.og-table tr:last-child td { border-bottom: 0; }
.og-table th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; }
.og-table td:first-child { white-space: nowrap; }
.og-table td:last-child { overflow-wrap: anywhere; }

/* Questions */
.og-faq-list { max-width: 760px; }
.og-faq details { border-bottom: 1px solid var(--line); }
.og-faq details:first-child { border-top: 1px solid var(--line); }
.og-faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.og-faq details p { color: var(--muted); margin: 0 0 16px; }
.og-faq:not(.features) + .contact { border-top: 1px solid var(--line); }
