/*
|--------------------------------------------------------------------------
| iToolsera YouTube Embed Code Generator
| v1.0.2
|--------------------------------------------------------------------------
|
| Uses the existing iToolsera homepage/tool design system.
| Only tool-specific components are defined here.
|--------------------------------------------------------------------------
*/

.youtube-embed-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 24px;
}

.youtube-embed-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.youtube-embed-option {
  min-width: 0;
}

.youtube-embed-option label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.86rem;
}

.youtube-embed-option.is-disabled {
  opacity: 0.55;
}

.youtube-embed-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin: 18px 0;
}

.youtube-embed-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #334155;
  font-size: 0.88rem;
  cursor: pointer;
}

.youtube-embed-check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.youtube-embed-result {
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
  padding: 20px;
}

.youtube-embed-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.youtube-embed-result-kicker {
  display: block;
  margin-bottom: 3px;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.youtube-embed-preview-wrap {
  margin-top: 4px;
}

.youtube-embed-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.youtube-embed-preview-heading > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.youtube-embed-preview-heading strong {
  color: #334155;
  font-size: 0.9rem;
}

.youtube-embed-preview-heading span:not(.youtube-embed-preview-size) {
  color: #64748b;
  font-size: 0.78rem;
}

.youtube-embed-preview-size {
  flex: 0 0 auto;
  padding: 5px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.youtube-embed-preview-stage {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  width: 100%;
  min-height: 180px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background:
    linear-gradient(
      45deg,
      rgba(148, 163, 184, 0.08) 25%,
      transparent 25%,
      transparent 75%,
      rgba(148, 163, 184, 0.08) 75%
    ),
    linear-gradient(
      45deg,
      rgba(148, 163, 184, 0.08) 25%,
      transparent 25%,
      transparent 75%,
      rgba(148, 163, 184, 0.08) 75%
    );
  background-position:
    0 0,
    8px 8px;
  background-size: 16px 16px;
}

.youtube-embed-preview-frame {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  transform-origin: top center;
}

.youtube-embed-preview-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}

.youtube-embed-preview-note {
  margin-top: 8px;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.45;
}

.youtube-embed-size-hint {
  margin-top: -4px;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.5;
}

.youtube-embed-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.youtube-embed-details > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}

.youtube-embed-details span {
  color: #64748b;
  font-size: 0.78rem;
}

.youtube-embed-details strong {
  color: #0f172a;
  font-family: monospace;
  font-size: 0.86rem;
  word-break: break-all;
}

.youtube-embed-code-wrap {
  margin-top: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.youtube-embed-code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f1f5f9;
}

.youtube-embed-code-header strong {
  color: #475569;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#youtubeEmbedCodeOutput {
  min-height: 190px;
  border: 0;
  border-radius: 0;
  resize: vertical;
  font-family: monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  background: #fff;
}

.youtube-embed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.youtube-embed-note {
  margin-top: 14px;
  color: #475569;
  font-size: 0.86rem;
  line-height: 1.55;
}

.youtube-embed-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.youtube-embed-info-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.youtube-embed-info-card > i {
  margin-bottom: 4px;
  font-size: 1.35rem;
}

.youtube-embed-info-card strong {
  font-size: 0.95rem;
}

.youtube-embed-info-card span {
  color: #64748b;
  font-size: 0.86rem;
  line-height: 1.55;
}

@media (max-width: 767.98px) {
  .youtube-embed-preview-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .youtube-embed-preview-size {
    white-space: normal;
  }

  .youtube-embed-card {
    padding: 16px;
  }

  .youtube-embed-options,
  .youtube-embed-details,
  .youtube-embed-info-grid {
    grid-template-columns: 1fr;
  }

  .youtube-embed-checks {
    align-items: flex-start;
    flex-direction: column;
  }

  .youtube-embed-result-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .youtube-embed-actions {
    flex-direction: column;
  }

  .youtube-embed-actions .btn {
    width: 100%;
  }

  .youtube-embed-code-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
