/* basic.css - Hero + Basic section styles (production-ready) */

:root {
  --ytd-muted: #475569;
  --ytd-brand-1: #5b6cff;
  --ytd-brand-2: #7c5cff;
  --yte-text: #222222;
  --yte-border: rgba(2, 6, 23, 0.1);
  --yte-border-2: rgba(2, 6, 23, 0.14);
  --yte-soft: rgba(2, 6, 23, 0.02);
  --yte-shadow: 0 16px 40px rgba(20, 25, 40, 0.08);
  --yte-radius: 18px;
  --yte-radius-sm: 12px;
  --yte-black: #111;
}

/* Utility hidden */
.ytd-hidden {
  display: none !important;
}

/* Hero wrapper */
.ytd-hero-wrapper {
  max-width: 980px;
  margin: 18px auto;
  padding: 8px;
}
.ytd-hero-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.ytd-input {
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: var(--ytd-radius-sm);
  border: 1px solid var(--ytd-border);
  font-size: 15px;
  color: var(--ytd-text);
  background: #fff;
}
.ytd-input:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(91, 108, 255, 0.08);
  border-color: rgba(91, 108, 255, 0.25);
}

/* Button */
.ytd-button {
  padding: 12px 16px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(90deg, var(--ytd-brand-1), var(--ytd-brand-2));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.ytd-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error */
.ytd-basic-error {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 0, 0, 0.06);
  border: 1px solid rgba(255, 0, 0, 0.12);
  font-size: 14px;
  color: #7f1d1d;
}

/* Basic section wrapper */
.ytd-basic {
  margin-top: 26px;
  padding: 26px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(20, 25, 40, 0.08);
}

/* Preview top row */
.yte-video {
  display: flex;
  gap: 12px;
  align-items: center;
}
.yte-thumb {
  width: 120px;
  height: 68px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.04);
  border: 1px solid rgba(2, 6, 23, 0.06);
}

/* Grid */
.ytd-thumb-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 18px;
}

.ytd-thumb-card {
  border: 1px solid rgba(2, 6, 23, 0.06);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.ytd-thumb-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: rgba(2, 6, 23, 0.03);
}

.ytd-thumb-info {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ytd-thumb-label {
  font-weight: 800;
  font-size: 14px;
  color: var(--ytd-text);
}

.ytd-thumb-dim {
  font-size: 13px;
  color: var(--ytd-muted);
}

/* Download button */
.ytd-download-btn {
  padding: 8px 12px;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.ytd-download-btn:hover {
  color: #fff !important;
  box-shadow: 0 16px 38px rgba(91, 108, 255, 0.25);
}

/* Actions */
.ytd-basic-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.yte-action {
  border: 1px solid var(--yte-border-2);
  background: #fff;
  padding: 10px 12px;
  border-radius: var(--yte-radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--yte-text);
}

.yte-action:hover {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 16px 38px rgba(91, 108, 255, 0.25);
}

.yte-action.ytd-hidden {
  display: none !important;
}

/* Metadata panel */
.yte-field {
  margin-top: 18px;
  border: 1px solid rgba(2, 6, 23, 0.06);
  background: rgba(2, 6, 23, 0.02);
  border-radius: 12px;
  padding: 12px;
}

/* Status / note */
.yte-note {
  margin-top: 12px;
  color: var(--ytd-muted);
  font-size: 14px;
}

/* Upgrade CTA */
.ytd-upgrade-box {
  margin-top: 22px;
  padding: 16px;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.03);
  border: 1px solid rgba(2, 6, 23, 0.06);
  text-align: center;
}
.yte-action-primary {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 16px 38px rgba(91, 108, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

/* Responsive */
@media (max-width: 640px) {
  .ytd-basic-bar {
    flex-direction: column;
  }
  .yte-thumb {
    width: 84px;
    height: 48px;
  }
  .ytd-thumb-img {
    height: 120px;
  }
}
/* ensure Open Original visible when not hidden */
.yte-action.ytd-hidden {
  display: none !important;
}
#ytd-open-original {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

/* preview area spacing */
.yte-video {
  gap: 14px;
  align-items: center;
  display: flex;
}
#ytd-preview-thumb {
  width: 160px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
}

/* thumb card improvements */
.ytd-thumb-card {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.ytd-thumb-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.08);
}

/* download button visibility */
.ytd-download-btn {
  display: inline-block;
}

/* status area */
#ytd-status-area {
  min-height: 20px;
  color: #475569;
}

/* small spinner (optional) */
.ytd-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-top-color: #5b6cff;
  animation: ytd-spin 0.9s linear infinite;
  vertical-align: middle;
}
@keyframes ytd-spin {
  to {
    transform: rotate(360deg);
  }
}

.ytd-basic-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}
.ytd-basic-bar input {
  flex: 1;
  min-width: 240px;
  border: 1px solid var(--yte-border-2) !important;
  border-radius: var(--yte-radius-sm) !important;
  padding: 12px 14px !important;
  outline: none;
  background: #fff;
  color: var(--yte-text) !important;
}
.ytd-basic-bar input:focus {
  box-shadow: 0 0 0 4px rgba(91, 108, 255, 0.08);
  border-color: rgba(91, 108, 255, 0.25);
}
.ytd-basic-bar button {
  padding: 12px 16px;
  border: none;
  border-radius: var(--yte-radius-sm);
  background: linear-gradient(90deg, var(--ytd-brand-1), var(--ytd-brand-2));
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}