/**
 * Wiki Chino - Estilos Personalizados
 * CSS consolidado para copiar en Administration → Theme → Custom CSS
 */

/* ============================================================================
   1. BOTÓN CONVERSOR CHINO (简/繁)
   ============================================================================ */
/* Botones del header - Estilo integrado como dropdown nativo */
.header-btn-left,
.header-btn-right,
.chinese-toggle-btn,
.niveles-btn {
  margin: 0 4px;
  padding: 0 12px;
  height: 36px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.87);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: none;
  letter-spacing: normal;
}

.header-btn-left:hover,
.header-btn-right:hover,
.chinese-toggle-btn:hover,
.niveles-btn:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

/* Dark mode support */
.theme--dark .header-btn-left,
.theme--dark .header-btn-right,
.theme--dark .chinese-toggle-btn,
.theme--dark .niveles-btn {
  color: rgba(255, 255, 255, 0.87);
}

.theme--dark .header-btn-left:hover,
.theme--dark .header-btn-right:hover,
.theme--dark .chinese-toggle-btn:hover,
.theme--dark .niveles-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* ============================================================================
   2. FILTRO DE NIVELES DE DIFICULTAD EN HEADER
   ============================================================================ */

/* Filtro en el header - extremo derecho */
.level-filter-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 15px;
  padding: 0;
}

.filter-label-header {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  margin: 0;
}

.level-dropdown-header {
  padding: 5px 10px;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  min-width: 160px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.level-dropdown-header:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.level-dropdown-header:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.level-dropdown-header option {
  background: #2c2c2c;
  color: white;
  padding: 8px;
}

/* Grupos CEFR / HSK en el panel de niveles */
.level-group {
  margin-top: 8px;
}
.level-group-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 4px;
}
.theme--dark .level-group-title {
  color: rgba(255, 255, 255, 0.5);
}
.level-group-all {
  margin-bottom: 2px;
}

/* ============================================================================
   3. BADGES DE NIVEL (en contenido)
   ============================================================================ */

/* Barra de filtros */
.level-filter-bar {
  margin: 20px 0;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  width: 100%;
  box-sizing: border-box;
}

/* Cuando está en el sidebar */
.v-navigation-drawer .level-filter-bar,
aside .level-filter-bar,
nav .level-filter-bar {
  position: sticky;
  bottom: 20px;
  margin: 20px 10px;
  padding: 12px;
}

.level-filter-container {
  color: white;
}

/* Header con dropdown */
.filter-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 16px;
  font-weight: bold;
  margin: 0;
}

.level-dropdown {
  padding: 8px 12px;
  font-size: 14px;
  border: 2px solid white;
  border-radius: 5px;
  background: rgba(255,255,255,0.9);
  color: #333;
  cursor: pointer;
  min-width: 200px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.level-dropdown:hover {
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.level-dropdown:focus {
  outline: none;
  border-color: #ffd700;
  box-shadow: 0 0 0 3px rgba(255,215,0,0.3);
}

.filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.filter-btn {
  padding: 8px 12px;
  border: 2px solid white;
  background: rgba(255,255,255,0.15);
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  text-align: left;
  width: 100%;
}

.filter-btn:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.filter-btn.active {
  background: var(--level-color, white);
  border-color: var(--level-color, white);
  color: white;
  font-weight: bold;
}

.filter-stats {
  font-size: 14px;
  opacity: 0.9;
  margin-top: 5px;
}

/* Estilos para los elementos con nivel - Solo badge, sin barra */
[data-nivel] {
  transition: opacity 0.2s;
}

/* Badge HSK / CEFR */
[data-nivel]::after {
  content: "HSK " attr(data-nivel);
  display: inline-block;
  padding: 4px 10px;
  margin-left: 10px;
  font-size: 12px;
  font-weight: bold;
  border-radius: 4px;
  color: white;
}

[data-nivel="1"]::after { background: #4caf50; }
[data-nivel="2"]::after { background: #8bc34a; }
[data-nivel="3"]::after { background: #ff9800; }
[data-nivel="4"]::after { background: #ff5722; }
[data-nivel="5"]::after { background: #f44336; }
[data-nivel="6"]::after { background: #d32f2f; }
[data-nivel="a1"]::after { content: "A1"; background: #1e88e5; }
[data-nivel="a2"]::after { content: "A2"; background: #0d47a1; }
[data-nivel="b1"]::after { content: "B1"; background: #ab47bc; }
[data-nivel="b2"]::after { content: "B2"; background: #6a1b9a; }

.filtered-out {
  display: none !important;
}

/* ============================================================================
   3. TEXT-TO-SPEECH (BOTONES DE LECTURA)
   ============================================================================ */
.speech-btn-container {
  float: right;
  margin: 0 0 10px 10px;
}

/* ── Level badges: place speech+badge container to the RIGHT of each element,
      outside the text flow entirely ── */
.contents [data-nivel],
main [data-nivel] {
  position: relative;
  overflow: visible;
}

.contents [data-nivel] .speech-btn-container,
main [data-nivel] .speech-btn-container {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  position: static;
  float: none;
  transform: none;
}

.speech-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  background: #9e9e9e;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  transition: opacity 0.2s;
  vertical-align: middle;
  line-height: 1;
  opacity: 0.75;
}

.speech-btn:hover {
  opacity: 1;
}

.speech-btn.speaking {
  background: #f44336;
  opacity: 1;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.speech-btn svg {
  width: 14px;
  height: 14px;
}

.speech-lang-toggle {
  position: absolute;
  top: 42px;
  right: 0;
  background: white;
  padding: 0;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 0 2px rgba(0,0,0,0.14);
  z-index: 1000;
  min-width: 180px;
  max-height: 0 !important;
  overflow: hidden;
  opacity: 0 !important;
  visibility: hidden;
  transition: max-height 0.3s, opacity 0.2s, padding 0.3s, visibility 0s linear 0.3s;
}

.speech-lang-toggle.active {
  max-height: 600px !important;
    overflow-y: auto;
  opacity: 1 !important;
  visibility: visible;
  padding: 8px 0;
  transition: max-height 0.3s, opacity 0.2s, padding 0.3s, visibility 0s linear 0s;
}

.speech-lang-toggle label {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.87);
  transition: background-color 0.2s;
}

.speech-lang-toggle label:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.speech-lang-toggle input[type="radio"],
.speech-lang-toggle input[type="checkbox"] {
  margin-right: 12px;
}

/* ============================================================================
   WC DROPDOWN PANELS (Nivel + Chinese toggle)
   ============================================================================ */
.wc-dropdown-panel {
  position: fixed;
  /* top + right set by JS on open */
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.14), 0 1px 4px rgba(0,0,0,0.08);
  z-index: 9999;
  min-width: 240px;
  padding: 10px;
  display: none;
}

.wc-dropdown-panel.active {
  display: block;
  animation: wc-panel-in 0.15s ease;
}

@keyframes wc-panel-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wc-panel-section {
  padding: 4px 0;
}

.wc-panel-section + .wc-panel-section {
  border-top: 1px solid rgba(0,0,0,0.07);
  margin-top: 8px;
  padding-top: 10px;
}

.wc-section-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(0,0,0,0.4);
  margin-bottom: 6px;
  font-family: Arial, sans-serif;
}

.wc-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.wc-level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  border-radius: 4px;
  color: white;
  background: #666;
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  opacity: 0.55;
}

.wc-level-pill:hover { opacity: 0.8; }

.wc-level-pill.active {
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.35);
}

.wc-pill-all {
  background: #616161 !important;
  width: 100%;
  border-radius: 4px;
  font-size: 13px;
  padding: 6px 10px;
}

.wc-char-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  font-family: Arial, sans-serif;
  border-radius: 4px;
  color: rgba(0,0,0,0.6);
  background: rgba(0,0,0,0.06);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  flex: 1;
}

.wc-char-btn:hover { background: rgba(0,0,0,0.1); }

.wc-char-btn.active {
  background: #1976d2;
  color: white;
  box-shadow: 0 0 0 2px rgba(25,118,210,0.3);
}

.wc-panel-mode { padding-bottom: 6px; }

.wc-toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(0,0,0,0.65);
  cursor: pointer;
  font-family: Arial, sans-serif;
  user-select: none;
}

.wc-toggle-row input[type="checkbox"] { cursor: pointer; }

/* Dark mode */
.theme--dark .wc-dropdown-panel {
  background: #2d2d2d;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 1px 4px rgba(0,0,0,0.3);
}

.theme--dark .wc-panel-section + .wc-panel-section {
  border-top-color: rgba(255,255,255,0.1);
}

.theme--dark .wc-section-label { color: rgba(255,255,255,0.4); }

.theme--dark .wc-toggle-row { color: rgba(255,255,255,0.65); }

.theme--dark .wc-char-btn {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
}

.theme--dark .wc-char-btn:hover { background: rgba(255,255,255,0.14); }

/* Toggle de modo exclusivo/aditivo */
.level-mode-toggle {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(0, 0, 0, 0.02);
}

.mode-toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.87);
}

.mode-toggle-label input[type="checkbox"] {
  margin-right: 8px;
  cursor: pointer;
}

.mode-toggle-text {
  user-select: none;
}

.theme--dark .level-mode-toggle {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
}

.theme--dark .mode-toggle-label {
  color: rgba(255, 255, 255, 0.87);
}
/* Dark mode para el panel TTS */
.theme--dark .speech-lang-toggle {
  background: #424242;
}

.theme--dark .speech-lang-toggle label {
  color: rgba(255, 255, 255, 0.87);
}

.theme--dark .speech-lang-toggle label:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

/* ============================================================================
   4. TABLAS MEJORADAS
   ============================================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}

table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

table th {
  padding: 12px;
  text-align: left;
  font-weight: bold;
}

table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e0e0e0;
}

table tr:nth-child(even) {
  background-color: #f5f5f5;
}

table tr:hover {
  background-color: #e3f2fd;
}

/* ============================================================================
   5. ELEMENTOS MULTIMEDIA
   ============================================================================ */
img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin: 15px 0;
}

video, audio {
  max-width: 100%;
  border-radius: 8px;
  margin: 15px 0;
}

iframe {
  border-radius: 8px;
  margin: 15px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ============================================================================
   6. BLOQUES DE DIÁLOGO
   ============================================================================ */
.dialogo {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
  margin: 20px 0;
  font-family: 'Noto Sans SC', sans-serif;
}

.dialogo strong {
  color: #1976d2;
  display: block;
  margin-bottom: 5px;
}

/* ============================================================================
   7. CAJAS DE CONSEJO/TIP
   ============================================================================ */
.tip, .consejo {
  background: #fff3e0;
  border-left: 4px solid #ff9800;
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 4px;
}

.tip::before, .consejo::before {
  content: "💡 ";
  font-size: 20px;
  margin-right: 10px;
}

.warning, .advertencia {
  background: #ffebee;
  border-left: 4px solid #f44336;
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 4px;
}

.warning::before, .advertencia::before {
  content: "⚠️ ";
  font-size: 20px;
  margin-right: 10px;
}

.success, .exito {
  background: #e8f5e9;
  border-left: 4px solid #4caf50;
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 4px;
}

.success::before, .exito::before {
  content: "✅ ";
  font-size: 20px;
  margin-right: 10px;
}

/* ============================================================================
   8. TIPOGRAFÍA CHINA
   ============================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Noto+Sans+TC:wght@300;400;500;700&display=swap');

.chinese, .zh, [lang="zh"], [lang="zh-CN"], [lang="zh-TW"] {
  font-family: 'Noto Sans SC', 'Noto Sans TC', sans-serif;
  line-height: 1.8;
}

/* Pinyin */
.pinyin {
  color: #666;
  font-size: 0.9em;
  font-style: italic;
}

/* ============================================================================
   9. RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
  .filter-buttons {
    flex-direction: column;
  }
  
  .filter-btn {
    width: 100%;
  }
  
  .speech-btn-container {
    float: none;
    display: block;
    margin: 0 0 10px 0;
  }
  
  .speech-btn {
    width: 100%;
    justify-content: center;
  }
  
  .chinese-toggle-btn {
    top: 60px;
    right: 10px;
    padding: 8px 12px;
    font-size: 12px;
  }
  
  .speech-lang-toggle {
    bottom: 10px;
    right: 10px;
    font-size: 12px;
  }
  
  table {
    font-size: 12px;
  }
  
  table th, table td {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .level-filter-bar {
    padding: 15px;
  }
  
  [data-nivel] {
    padding: 10px;
    font-size: 14px;
  }
  
  .chinese-toggle-btn {
    top: 50px;
    right: 5px;
  }
}

/* ============================================================================
   10. DARK MODE (OPCIONAL)
   ============================================================================ */
@media (prefers-color-scheme: dark) {
  [data-nivel] {
    background: rgba(255,255,255,0.05);
  }
  
  table tr:nth-child(even) {
    background-color: rgba(255,255,255,0.05);
  }
  
  table tr:hover {
    background-color: rgba(33, 150, 243, 0.2);
  }
  
  table td {
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .tip, .consejo {
    background: rgba(255, 152, 0, 0.1);
  }
  
  .warning, .advertencia {
    background: rgba(244, 67, 54, 0.1);
  }
  
  .success, .exito {
    background: rgba(76, 175, 80, 0.1);
  }
}

/* ============================================================================
   11. ANIMACIONES
   ============================================================================ */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.level-filter-bar {
  animation: slideIn 0.5s ease-out;
}


/* ============================================================================
   12. IMPRESIÓN / PDF
   ============================================================================ */
.print-cover {
  display: none;
}

.print-cover__inner {
  max-width: 720px;
  margin: 0 auto;
}

.print-cover__kicker {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
  margin-bottom: 12px;
}

.print-cover__citation {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  padding: 16px 18px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  word-break: break-word;
}
@media print {
  /* Ocultar scripts y código JavaScript */
    script,
    .code-injection,
    [data-code-injection],
    pre code,
    code {
      display: none !important;
      visibility: hidden !important;
      height: 0 !important;
      width: 0 !important;
      overflow: hidden !important;
      font-size: 0 !important;
      line-height: 0 !important;
      margin: 0 !important;
      padding: 0 !important;
    }
  /* Ocultar elementos de navegación y UI */
  .v-toolbar,
  .v-navigation-drawer,
  .v-footer,
  header,
  nav,
  .chinese-toggle-btn,
  .niveles-btn,
  .pdf-export-btn,
  .speech-btn,
  .speech-lang-toggle,
  .level-filter-bar,
  .speech-lang-toggle,
  button:not(.content button),
  .v-btn {
    display: none !important;
  }
  
  /* Ocultar dropdowns y overlays JS */
  #chinese-panel,
  #niveles-panel,
  #tts-panel,
  #wc-view-badge-overlay,
  #wc-badge-overlay,
  .wc-dropdown-panel,
  .speech-btn {
    display: none !important;
  }

  /* Mostrar badges CSS ::after en lugar del overlay JS */
  [data-nivel].has-dynamic-badges::after {
    display: inline-block !important;
  }

  /* Optimizar contenido para impresión */
  body {
    margin: 0;
    padding: 20px;
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }
  
                                                                                                                                                                                                                                                                /* Portada de cita: primera página */
                                                                                                                                                                                                                                                                .print-cover {
                                                                                                                                                                                                                                                                  display: block !important;
                                                                                                                                                                                                                                                                  padding: 24px 0 0;
                                                                                                                                                                                                                                                                  page-break-after: always;
                                                                                                                                                                                                                                                                  break-after: page;
                                                                                                                                                                                                                                                                }
                                                                                                                                
                                                                                                                                                                                                                                                                .print-cover__citation {
                                                                                                                                                                                                                                                                  background: #fff;
                                                                                                                                                                                                                                                                  border-color: #bbb;
                                                                                                                                                                                                                                                                }
  main,
  .contents,
  .v-content {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
  }
  
  /* Mantener badges HSK visibles */
  [data-nivel]::after {
    display: inline-block !important;
    page-break-inside: avoid;
  }
  
  /* Evitar rupturas de página en elementos críticos */
  [data-nivel],
  h1, h2, h3, h4, h5, h6,
  .dialogo,
  blockquote {
    page-break-inside: avoid;
    page-break-after: avoid;
  }
  
  /* Tablas */
  table {
    page-break-inside: avoid;
    border-collapse: collapse;
    width: 100%;
  }
  
  table thead {
    display: table-header-group;
  }
  
  /* Imágenes */
  img {
    max-width: 100%;
    page-break-inside: avoid;
  }
  
  /* Enlaces - mostrar URL */
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
  
  /* Títulos de página */
  h1 {
    font-size: 24pt;
    margin-top: 0;
    page-break-after: avoid;
  }
  
  h2 {
    font-size: 18pt;
    margin-top: 16pt;
    page-break-after: avoid;
  }
  
  h3 {
    font-size: 14pt;
    margin-top: 12pt;
    page-break-after: avoid;
  }
  
  /* Bloques de contenido */
  p, li {
    orphans: 3;
    widows: 3;
  }
}

/* ============================================================================
   FORMULARIO DE CONTACTO (página Contacto)
   Los estilos van aquí porque Wiki.js elimina <style> del contenido de la página.
   ============================================================================ */
.wiki-contact-form-wrapper {
  max-width: 580px;
  margin: 0 auto;
  padding: 2rem 0;
  box-sizing: border-box;
}
.wiki-contact-header {
  margin-bottom: 1.75rem;
}
.wiki-contact-title {
  margin: 0 0 0.5rem 0 !important;
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: #1a1a2e !important;
  letter-spacing: -0.02em;
}
.theme--dark .wiki-contact-title {
  color: #f0f0f5 !important;
}
.wiki-contact-intro {
  margin: 0 !important;
  font-size: 1rem;
  line-height: 1.5;
  color: #4a4a5a !important;
}
.theme--dark .wiki-contact-intro {
  color: rgba(255, 255, 255, 0.75) !important;
}
.wiki-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  padding: 1.75rem !important;
  background: #f8f9fc !important;
  border: 1px solid #e2e6ef !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 12px rgba(102, 126, 234, 0.08) !important;
  box-sizing: border-box;
}
.theme--dark .wiki-contact-form {
  background: rgba(26, 26, 46, 0.5) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}
.wiki-contact-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.wiki-contact-field label {
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  color: #2d2d3a !important;
}
.theme--dark .wiki-contact-field label {
  color: rgba(255, 255, 255, 0.9) !important;
}
.wiki-contact-field .required {
  color: #b91c1c !important;
}
.theme--dark .wiki-contact-field .required {
  color: #f87171 !important;
}
.wiki-contact-form-wrapper .wiki-contact-field input,
.wiki-contact-form-wrapper .wiki-contact-field textarea {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  line-height: 1.4 !important;
  border: 2px solid #c7cddc !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #1a1a2e !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
}
.wiki-contact-form-wrapper .wiki-contact-field input::placeholder,
.wiki-contact-form-wrapper .wiki-contact-field textarea::placeholder {
  color: #6b7280 !important;
}
.theme--dark .wiki-contact-form-wrapper .wiki-contact-field input,
.theme--dark .wiki-contact-form-wrapper .wiki-contact-field textarea {
  border-color: rgba(255, 255, 255, 0.25) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.95) !important;
}
.theme--dark .wiki-contact-form-wrapper .wiki-contact-field input::placeholder,
.theme--dark .wiki-contact-form-wrapper .wiki-contact-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}
.wiki-contact-form-wrapper .wiki-contact-field input:hover,
.wiki-contact-form-wrapper .wiki-contact-field textarea:hover {
  border-color: #667eea !important;
}
.wiki-contact-form-wrapper .wiki-contact-field input:focus,
.wiki-contact-form-wrapper .wiki-contact-field textarea:focus {
  outline: none !important;
  border-color: #667eea !important;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3) !important;
}
.wiki-contact-form-wrapper .wiki-contact-field textarea {
  resize: vertical !important;
  min-height: 130px !important;
}
.wiki-contact-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.wiki-contact-form-wrapper .wiki-contact-submit,
.wiki-contact-form-wrapper .wiki-contact-reset {
  -webkit-appearance: none !important;
  appearance: none !important;
  padding: 0.75rem 1.5rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 8px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  transition: transform 0.15s, box-shadow 0.2s !important;
  box-sizing: border-box !important;
}
.wiki-contact-form-wrapper .wiki-contact-submit {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4) !important;
}
.wiki-contact-form-wrapper .wiki-contact-submit:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.45) !important;
}
.wiki-contact-form-wrapper .wiki-contact-submit:active {
  transform: translateY(0) !important;
}
.wiki-contact-form-wrapper .wiki-contact-reset {
  background: #ffffff !important;
  border: 2px solid #c7cddc !important;
  color: #374151 !important;
}
.wiki-contact-form-wrapper .wiki-contact-reset:hover {
  background: #f3f4f6 !important;
  border-color: #667eea !important;
  color: #667eea !important;
}
.theme--dark .wiki-contact-form-wrapper .wiki-contact-reset {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}
.theme--dark .wiki-contact-form-wrapper .wiki-contact-reset:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: #667eea !important;
  color: #a5b4fc !important;
}
.wiki-contact-status {
  font-size: 0.95rem !important;
  margin: 0.5rem 0 0 0 !important;
  min-height: 1.5em;
}
.wiki-contact-status.success { color: #15803d !important; }
.theme--dark .wiki-contact-status.success { color: #86efac !important; }
.wiki-contact-status.error { color: #b91c1c !important; }
.theme--dark .wiki-contact-status.error { color: #fca5a5 !important; }
