/* ============================================================
   GENERADOR SCHEMA.ORG JSON-LD - FIJATE TOOLS
   Diseño corporativo, accesible, responsivo y 100 % local
   ============================================================ */

:root {
  color-scheme: dark;
  --bg-body: #0c0f17;
  --bg-surface: #141824;
  --bg-card: rgba(26, 32, 48, 0.7);
  --bg-card-hover: rgba(32, 40, 60, 0.85);
  --bg-input: #101420;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #ff8507;
  --primary: #ff8507;
  --primary-hover: #ff9924;
  --primary-glow: rgba(255, 133, 7, 0.25);
  --accent-cyan: #06b6d4;
  --accent-purple: #a855f7;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.25);
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', var(--font-sans);
  --font-mono: 'JetBrains Mono', monospace;
}

[data-theme="light"] {
  color-scheme: light;
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #f8fafc;
  --border-color: #e2e8f0;
  --border-focus: #ff8507;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   CABECERA
   ============================================================ */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.header-container {
  max-width: 1500px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-back-tools {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition);
}

.btn-back-tools:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 133, 7, 0.2), rgba(255, 153, 36, 0.2));
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.badge-local {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--bg-card-hover);
}

/* ============================================================
   CONTENEDOR PRINCIPAL
   ============================================================ */
.main-wrapper {
  flex: 1;
  max-width: 1500px;
  width: 100%;
  margin: 1.5rem auto 4rem auto;
  padding: 0 1.5rem;
}

.tool-hero {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.tool-hero-text h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
  background: linear-gradient(135deg, var(--text-primary) 40%, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tool-hero-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 760px;
}

.hero-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

/* Selector de tipo Schema */
.schema-selector-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.schema-type-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.schema-type-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.schema-type-btn.active {
  background: var(--primary);
  color: #0b0f17 !important;
  font-weight: 700;
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(255, 133, 7, 0.35);
}

/* Layout 2 columnas: Formulario y Preview */
.schema-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 1.75rem;
  align-items: start;
}

@media (max-width: 1050px) {
  .schema-grid {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-subtle);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.panel-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-primary);
}

/* Formulario */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-control {
  padding: 0.65rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 133, 7, 0.15);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Items dinámicos (FAQ, Breadcrumbs) */
.dynamic-item-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.btn-remove-dynamic {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--accent-rose);
  cursor: pointer;
  padding: 0.2rem;
}

.btn-add-dynamic {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px dashed var(--border-color);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

.btn-add-dynamic:hover {
  border-color: var(--primary);
  background: rgba(255, 133, 7, 0.08);
}

/* ============================================================
   SIMULADOR GOOGLE SERP RICH SNIPPET
   ============================================================ */
.serp-box {
  background: #202124;
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1.5rem;
  font-family: Arial, sans-serif;
}

.serp-url-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.35rem;
}

.serp-favicon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #3c4043;
}

.serp-site-info {
  display: flex;
  flex-direction: column;
}

.serp-site-name {
  font-size: 13px;
  color: #dadce0;
  line-height: 1.2;
}

.serp-breadcrumb {
  font-size: 11px;
  color: #bdc1c6;
}

.serp-title {
  font-size: 19px;
  font-weight: 400;
  color: #8ab4f8;
  line-height: 1.3;
  margin-bottom: 0.35rem;
  cursor: pointer;
}

.serp-desc {
  font-size: 13px;
  color: #bdc1c6;
  line-height: 1.45;
}

.serp-rich-row {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid #3c4043;
  font-size: 12px;
  color: #9aa0a6;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.serp-rating-stars {
  color: #fbbc04;
}

.serp-faq-snippet {
  margin-top: 0.6rem;
  border-top: 1px solid #3c4043;
  padding-top: 0.4rem;
}

.serp-faq-q {
  font-size: 13px;
  color: #8ab4f8;
  padding: 0.3rem 0;
  display: flex;
  justify-content: space-between;
}

/* ============================================================
   BLOQUE DE CÓDIGO JSON-LD
   ============================================================ */
.json-code-box {
  background: #090c13;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
}

.json-code-content {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #38bdf8;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 320px;
  overflow-y: auto;
  line-height: 1.5;
}

/* ============================================================
   BOTONES CORPORATIVOS
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--primary);
  color: #0b0f17 !important;
  font-weight: 700;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 14px rgba(255, 133, 7, 0.35);
  width: 100%;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #000000 !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 133, 7, 0.5);
}

.btn-secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-secondary-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
}

/* ============================================================
   MODAL Y TOAST
   ============================================================ */
.custom-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  padding: 1rem;
}

.custom-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.custom-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 460px;
  width: 100%;
  padding: 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.custom-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.custom-modal-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.custom-modal-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.btn-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.custom-modal-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.custom-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.btn-modal-secondary {
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
}

.btn-modal-danger {
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-rose);
  border: none;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.toast-notification {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2000;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-notification svg {
  color: var(--accent-emerald);
}

/* FAQ */
.edu-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-color);
}

.edu-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
}

.faq-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.faq-card h4 svg {
  color: var(--primary);
  flex-shrink: 0;
}

.faq-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
}
