/* =============================================================
   Video Aspect Ratio Checker & Stretch Preview
   Every selector is namespaced. Nothing here leaks into the
   rest of the site.
   ============================================================= */

.stretch-bg {
  background: #fafafa;
}

/* ---------- header ---------- */
.vs-title {
  text-align: center;
}

.vs-lede {
  max-width: 46rem;
  margin: 1rem auto 2rem;
  text-align: center;
  line-height: 1.65;
  color: #444;
}

/* ---------- shared card ---------- */
.vs-tool .vs-drop,
.vs-tool .vs-answer,
.vs-tool .vs-strip,
.vs-tool .vs-panel {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 15px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
}

/* ---------- drop zone ---------- */
.vs-tool .vs-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 3rem 1.5rem;
  border: 2px dashed #c9c9c9;
  border-radius: 15px;
  box-shadow: none;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.vs-tool .vs-drop:hover,
.vs-tool .vs-drop:focus-visible,
.vs-tool .vs-drop.is-dragover {
  border-color: #f2511b;
  background: #fff7f4;
  outline: none;
}

.vs-tool .vs-drop__title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #222;
}

.vs-tool .vs-drop__hint {
  font-size: 0.9rem;
  color: #777;
}

.vs-tool .vs-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.vs-tool .vs-hidden-video {
  display: none;
}

/* ---------- status ---------- */
.vs-tool .vs-status {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #f3f3f3;
  color: #555;
  font-size: 0.95rem;
  line-height: 1.55;
  text-align: center;
}

.vs-tool .vs-status--error {
  background: #fdf0ec;
  color: #8a2c0d;
  text-align: left;
}

/* ---------- the answer ---------- */
.vs-tool .vs-answer {
  margin-top: 1.25rem;
  padding: 2rem 1.5rem 1.75rem;
  text-align: center;
  border-top: 4px solid #f2511b;
}

.vs-tool .vs-answer.is-near {
  border-top-color: #e0a800;
}

.vs-tool .vs-answer.is-nonstandard {
  border-top-color: #b23b1a;
}

.vs-tool .vs-answer__eyebrow {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a8a8a;
}

.vs-tool .vs-answer__ratio {
  margin: 0.25rem 0 0;
  font-size: clamp(2.75rem, 11vw, 4.25rem);
  font-weight: 700;
  line-height: 1;
  color: #1a1a1a;
}

.vs-tool .vs-answer__dims {
  margin: 0.5rem 0 0;
  font-size: 1.15rem;
  color: #555;
}

.vs-tool .vs-answer__verdict {
  margin: 1rem 0 0;
  font-weight: 600;
  color: #222;
}

.vs-tool .vs-answer__note {
  margin: 0.35rem auto 0;
  max-width: 34rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #666;
}

.vs-tool .vs-answer__meta {
  margin: 1rem 0 0;
  font-size: 0.85rem;
  color: #999;
  word-break: break-word;
}

/* ---------- buttons ---------- */
.vs-tool .vs-btn {
  display: inline-block;
  margin-top: 1.1rem;
  padding: 0.6rem 1.15rem;
  border: 1px solid #f2511b;
  border-radius: 8px;
  background: #f2511b;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.vs-tool .vs-btn:hover {
  background: #d8430f;
  border-color: #d8430f;
}

.vs-tool .vs-btn--ghost {
  background: #fff;
  border-color: #ccc;
  color: #333;
}

.vs-tool .vs-btn--ghost:hover {
  background: #f2511b;
  border-color: #f2511b;
  color: #fff;
}

.vs-tool .vs-btn:focus-visible,
.vs-tool .vs-preset:focus-visible,
.vs-tool .vs-thumb:focus-visible {
  outline: 2px solid #f2511b;
  outline-offset: 2px;
}

/* ---------- frame picker ---------- */
.vs-tool .vs-strip {
  margin-top: 1.25rem;
  padding: 1.5rem;
  text-align: center;
}

.vs-tool .vs-h {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: #222;
}

.vs-tool .vs-sub {
  margin: 0.3rem 0 1rem;
  font-size: 0.9rem;
  color: #777;
}

.vs-tool .vs-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.vs-tool .vs-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: none;
  line-height: 0;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.vs-tool .vs-thumb img {
  display: block;
  width: 108px;
  height: auto;
  border-radius: 6px;
}

.vs-tool .vs-thumb:hover {
  border-color: #f9b39c;
}

.vs-tool .vs-thumb.is-selected {
  border-color: #f2511b;
}

/* ---------- compare ---------- */
.vs-tool .vs-compare {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.vs-tool .vs-panel {
  flex: 1 1 320px;
  min-width: 0;
  padding: 1.25rem;
  text-align: center;
}

.vs-tool .vs-canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.85rem auto 0;
  border-radius: 8px;
  background: #000;
}

.vs-tool .vs-dims {
  margin: 0.75rem 0 0;
  font-size: 0.95rem;
  color: #555;
}

/* ---------- presets ---------- */
.vs-tool .vs-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 1rem;
}

.vs-tool .vs-preset {
  padding: 0.4rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #fff;
  font-size: 0.88rem;
  color: #333;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.vs-tool .vs-preset:hover {
  background: #f2511b;
  border-color: #f2511b;
  color: #fff;
}

/* ---------- number fields ---------- */
.vs-tool .vs-controls {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.vs-tool .vs-field {
  flex: 1;
  display: block;
  margin: 0;
  text-align: left;
}

.vs-tool .vs-field span {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.85rem;
  color: #666;
}

.vs-tool .vs-field input {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  text-align: center;
  background: #fff;
  color: #222;
}

.vs-tool .vs-field input:focus {
  border-color: #f2511b;
  box-shadow: 0 0 0 2px rgba(242, 81, 27, 0.18);
  outline: none;
}

.vs-tool .vs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.vs-tool .vs-fineprint {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: #999;
}

/* ---------- content / FAQ ---------- */
.vs-content {
  padding: 2.5rem 0 3rem;
}

.vs-content .container-content h2 {
  margin-top: 2rem;
}

.vs-content .container-content ol,
.vs-content .container-content ul {
  line-height: 1.7;
}

/* ---------- tool footer ---------- */
.tool-footer {
  margin-top: 0;
  padding: 1.5rem;
  border-top: 1px solid #eee;
  font-size: 0.95rem;
  color: #444;
}

.tool-footer p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.tool-footer a {
  color: #f2511b;
  font-weight: 600;
  text-decoration: none;
}

.tool-footer a:hover {
  text-decoration: underline;
}

.tool-footer__links {
  font-size: 0.9rem;
  color: #777;
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .vs-tool * {
    transition: none !important;
  }
}

/* ---------- mobile ---------- */
@media (max-width: 640px) {
  .vs-tool .vs-drop {
    padding: 2.25rem 1rem;
  }

  .vs-tool .vs-answer {
    padding: 1.5rem 1rem 1.25rem;
  }

  .vs-tool .vs-thumb img {
    width: 84px;
  }

  .vs-tool .vs-actions .vs-btn {
    flex: 1 1 100%;
  }
}