/* ============================================================
   ESTILOS DE MODALES Y SIMULADOR SOCIAL (MODALS & SOCIAL SIMULATOR)
   ============================================================ */

/* Capa de fondo del modal (Overlay) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 7, 12, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Caja de diálogo modal */
.modal-dialog {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.96);
  transition: all var(--transition-normal);
  overflow: hidden;
}

.modal-dialog-large {
  max-width: 840px;
}

.modal-overlay.active .modal-dialog {
  transform: translateY(0) scale(1);
}

/* Cabecera del modal */
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-sidebar-header);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal-icon-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Cuerpo del modal */
.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scrollbar-width: thin;
}

/* Pie del modal */
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  background: var(--bg-sidebar-header);
}

/* ============================================================
   SIMULADOR DE REDES SOCIALES (SOCIAL PREVIEW MOCKUPS)
   ============================================================ */

.social-tabs {
  display: flex;
  background: var(--bg-card);
  padding: 0.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: 0.25rem;
}

.social-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.6rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.social-tab-btn:hover {
  color: var(--text-primary);
}

.social-tab-btn.active {
  background: var(--accent-primary);
  color: #ffffff;
}

.social-preview-container {
  background: #000000;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

/* 1. Tarjeta Twitter / X */
.x-card-preview {
  width: 100%;
  max-width: 520px;
  background: #000000;
  border: 1px solid #2f3336;
  border-radius: 16px;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.x-card-image-box {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #16181c;
}

.x-card-image-box img {
  width: 100%;
  height: auto;
  display: block;
}

.x-card-content {
  padding: 10px 14px;
  background: #000000;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.x-card-domain {
  font-size: 13px;
  color: #71767b;
  display: flex;
  align-items: center;
  gap: 4px;
}

.x-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #e7e9ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.x-card-desc {
  font-size: 13px;
  color: #71767b;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 2. Tarjeta LinkedIn */
.linkedin-card-preview {
  width: 100%;
  max-width: 520px;
  background: #1b1f23;
  border: 1px solid #38434f;
  border-radius: 8px;
  overflow: hidden;
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto;
}

.linkedin-header {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.linkedin-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #38434f;
  object-fit: cover;
}

.linkedin-user-info {
  display: flex;
  flex-direction: column;
}

.linkedin-author-name {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
}

.linkedin-author-role {
  font-size: 12px;
  color: #94a3b8;
}

.linkedin-post-text {
  padding: 0 12px 10px 12px;
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.4;
}

.linkedin-card-content {
  padding: 10px 12px;
  background: #283038;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.linkedin-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.linkedin-card-domain {
  font-size: 12px;
  color: #94a3b8;
}

/* 3. Tarjeta Facebook / WhatsApp */
.facebook-card-preview {
  width: 100%;
  max-width: 520px;
  background: #242526;
  border: 1px solid #3e4042;
  overflow: hidden;
}

.facebook-card-content {
  padding: 10px 12px;
  background: #3a3b3c;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.facebook-domain {
  font-size: 11px;
  text-transform: uppercase;
  color: #b0b3b8;
}

.facebook-title {
  font-size: 15px;
  font-weight: 600;
  color: #e4e6eb;
  line-height: 1.3;
}

.facebook-desc {
  font-size: 12px;
  color: #b0b3b8;
}

/* 4. Tarjeta Discord Rich Embed */
.discord-card-preview {
  width: 100%;
  max-width: 500px;
  background: #2b2d31;
  border-left: 4px solid var(--accent-primary);
  border-radius: 4px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: "gg sans", "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.discord-author {
  font-size: 12px;
  color: #949ba4;
  font-weight: 500;
}

.discord-title {
  font-size: 15px;
  font-weight: 700;
  color: #00a8fc;
  cursor: pointer;
}

.discord-desc {
  font-size: 13px;
  color: #dbdee1;
  line-height: 1.35;
}

.discord-image-box {
  border-radius: 6px;
  overflow: hidden;
  margin-top: 4px;
}

.discord-image-box img {
  width: 100%;
  height: auto;
  display: block;
}

/* 5. Google SERP */
.google-serp-preview {
  width: 100%;
  max-width: 580px;
  background: #202124;
  border-radius: 8px;
  padding: 14px 16px;
  font-family: Roboto, arial, sans-serif;
}

.google-serp-url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.google-serp-favicon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #8ab4f8;
}

.google-serp-domain {
  font-size: 12px;
  color: #dadce0;
}

.google-serp-title {
  font-size: 18px;
  color: #8ab4f8;
  line-height: 1.3;
  margin-bottom: 4px;
  cursor: pointer;
}

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

/* ============================================================
   GENERADOR DE META TAGS
   ============================================================ */

.code-block-wrapper {
  position: relative;
  background: #0d1017;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-block-header {
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.code-block-content {
  padding: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: #e2e8f0;
  overflow-x: auto;
  white-space: pre;
}

/* Atajos de teclado */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.shortcut-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.kbd-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--bg-input);
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
