/* Platform downloader pages. Colours follow the Facebook downloader templates so
   every tool on the site reads as one product. */
.vdl {
  --vdl-hero: #1a5f4f;
  --vdl-accent: #2dd4bf;
  --vdl-accent-hover: #14b8a6;
  --vdl-green: #065f46;
  --vdl-green-2: #047857;
  --vdl-blue: #2563eb;
  --vdl-blue-hover: #1d4ed8;
  --vdl-heading: #1d4ed8;
  --vdl-rule: #f97316;
  --vdl-step: #db2777;
  --vdl-ink: #1f2937;
  --vdl-muted: #4b5563;
  --vdl-line: #e5e7eb;
  --vdl-soft: #f5f5f5;
  --vdl-radius: 16px;
  --vdl-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  color: var(--vdl-ink);
}

.vdl [hidden] {
  display: none !important;
}

.vdl *,
.vdl *::before,
.vdl *::after {
  box-sizing: border-box;
}

/* Hero */
.vdl-hero {
  background: var(--vdl-hero);
  padding: 120px 20px;
  color: #fff;
  text-align: center;
}

.vdl-hero-inner {
  max-width: 900px;
  margin: 0 auto;
}

.vdl-title {
  margin: 0 0 24px;
  color: #fff;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.vdl-sub {
  margin: 8px 0 0;
  color: #e2d9f3;
  font-size: 1.05rem;
  line-height: 1.6;
}

.vdl-sub strong {
  color: #fff;
}

.vdl-form {
  margin-top: 30px;
}

.vdl-alert {
  margin: 0 0 16px;
  padding: 16px 20px;
  border-left: 4px solid #dc2626;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  font-weight: 700;
  text-align: left;
}

.vdl-input-row {
  display: flex;
  gap: 15px;
  align-items: stretch;
}

.vdl-field {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  margin: 0;
}

.vdl-field-icon {
  position: absolute;
  left: 20px;
  display: flex;
  color: #999;
  pointer-events: none;
}

/* the parent theme styles input[type=text] with a border, grey fill and its own
   padding, so these rules need the extra element + scope specificity */
.vdl input.vdl-input {
  width: 100%;
  height: auto;
  margin: 0;
  padding: 20px 25px 20px 55px;
  border: none;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: #333;
  font-size: 16px;
  line-height: 1.4;
}

.vdl input.vdl-input::placeholder {
  color: #8a8a8a;
}

.vdl input.vdl-input:focus {
  background: #fff;
  outline: 3px solid var(--vdl-accent);
  outline-offset: 2px;
}

.vdl-submit {
  padding: 20px 50px;
  border: none;
  border-radius: 8px;
  background: var(--vdl-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.vdl-submit:hover:not(:disabled) {
  background: var(--vdl-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(45, 212, 191, 0.4);
}

.vdl-submit:disabled {
  cursor: progress;
  opacity: 0.85;
}

/* Result card */
.vdl-result {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
  scroll-margin-top: 24px;
}

.vdl-card {
  overflow: hidden;
  border-radius: var(--vdl-radius);
  background: #fff;
  box-shadow: var(--vdl-shadow);
}

.vdl-card-head {
  padding: 30px;
  background: linear-gradient(135deg, var(--vdl-green), var(--vdl-green-2));
  color: #fff;
  text-align: center;
}

.vdl-card-title {
  margin: 0 0 10px;
  color: #fff;
  font-size: 28px;
}

.vdl-card-lead {
  margin: 0;
  opacity: 0.9;
}

.vdl-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
  padding: 40px;
}

.vdl-card-body > * {
  min-width: 0;
}

.vdl-thumb {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #e5e7eb;
  color: #9ca3af;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.vdl-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vdl-dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.vdl-video-title {
  margin: 15px 0 0;
  color: #333;
  font-size: 18px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.vdl-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vdl-dl {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 60px;
  padding: 14px 16px;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.2s;
}

.vdl-dl:hover:not(:disabled) {
  transform: translateY(-1px);
}

.vdl-dl:disabled {
  cursor: progress;
  opacity: 0.85;
}

.vdl-dl--video {
  background: var(--vdl-green);
}

.vdl-dl--video:hover:not(:disabled) {
  background: var(--vdl-green-2);
}

.vdl-dl--audio {
  background: var(--vdl-blue);
}

.vdl-dl--audio:hover:not(:disabled) {
  background: var(--vdl-blue-hover);
}

.vdl-dl-sub {
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
}

.vdl .vdl-dl--done,
.vdl .vdl-dl--done:hover,
.vdl .vdl-dl--done:visited {
  border: 2px solid var(--vdl-green);
  background: #ecfdf5;
  color: var(--vdl-green);
}

.vdl-more {
  margin-top: 16px;
  border: 1px solid var(--vdl-line);
  border-radius: 10px;
}

.vdl-more summary {
  padding: 12px 16px;
  color: var(--vdl-muted);
  font-weight: 700;
  cursor: pointer;
}

.vdl-fmts {
  padding: 0 16px 8px;
}

.vdl-fmt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--vdl-line);
}

.vdl-fmt-label {
  min-width: 0;
  color: var(--vdl-ink);
  overflow-wrap: anywhere;
}

.vdl-fmt-btn {
  flex: none;
  min-width: 88px;
  min-height: 40px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: var(--vdl-green);
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.vdl-fmt-btn:disabled {
  cursor: progress;
  opacity: 0.85;
}

.vdl-card-foot {
  padding: 25px;
  border-top: 1px solid #eee;
  background: #f8f9fa;
  text-align: center;
}

.vdl-again {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 48px;
  padding: 14px 32px;
  border: none;
  border-radius: 8px;
  background: var(--vdl-green);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.vdl-foot-note {
  margin: 15px 0 0;
  color: var(--vdl-muted);
  font-size: 13px;
}

/* Loading placeholder */
.vdl-skel {
  border-radius: 8px;
  background: linear-gradient(90deg, #eceff1 25%, #f7f8f9 50%, #eceff1 75%);
  background-size: 200% 100%;
  animation: vdl-shimmer 1.2s linear infinite;
}

.vdl-skel-head {
  height: 104px;
  border-radius: 0;
}

.vdl-skel-thumb {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
}

.vdl-skel-line {
  height: 18px;
  margin-bottom: 12px;
}

.vdl-skel-line--short {
  width: 60%;
}

.vdl-skel-btn {
  height: 60px;
  margin-top: 24px;
  border-radius: 10px;
}

@keyframes vdl-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .vdl-skel {
    animation: none;
  }

  .vdl-submit,
  .vdl-dl {
    transition: none;
  }
}

/* How-to */
.vdl-how {
  padding: 80px 20px;
  background: var(--vdl-soft);
}

.vdl-how-head {
  max-width: 1200px;
  margin: 0 auto 20px;
  padding-bottom: 20px;
  border-bottom: 3px solid var(--vdl-rule);
  text-align: center;
}

.vdl-how-title {
  margin: 0;
  color: var(--vdl-heading);
  font-size: 2rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.vdl-how-lead {
  margin: 0 0 40px;
  color: #444;
  font-size: 1.1rem;
  text-align: center;
}

.vdl-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.vdl-step {
  margin: 0;
  padding: 32px 24px 24px;
  border-radius: var(--vdl-radius);
  background: #fff;
  box-shadow: var(--vdl-shadow);
  text-align: center;
}

.vdl-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--vdl-hero);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.vdl-step-title {
  margin: 16px 0 0;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--vdl-step);
  color: var(--vdl-step);
  font-size: 22px;
  font-weight: 700;
}

.vdl-step-text {
  margin: 16px 0 0;
  color: #555;
  font-size: 15px;
  line-height: 1.7;
}

/* SEO article written in the page editor */
.vdl-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px;
  background: #fff;
}

.vdl-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 9999;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
}

@media (max-width: 900px) {
  .vdl-steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .vdl-hero {
    padding: 80px 16px;
  }

  .vdl-title {
    font-size: 32px;
    letter-spacing: 1px;
  }

  .vdl-input-row {
    flex-direction: column;
    gap: 12px;
  }

  .vdl-submit {
    width: 100%;
    padding: 18px;
  }

  .vdl-result {
    margin: 24px auto;
    padding: 0 16px;
  }

  .vdl-card-head {
    padding: 24px 16px;
  }

  .vdl-card-title {
    font-size: 22px;
  }

  .vdl-card-body {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 22px 16px;
  }

  .vdl-how {
    padding: 48px 16px;
  }

  .vdl-how-title {
    font-size: 1.5rem;
  }

  .vdl-content {
    padding: 32px 16px;
  }
}
