/* ===== Modo escuro único (InstantBlog e InstantShop) — v1.0.0
   Ativado por <html class="dark"> (definido no admin de cores, em "Modo escuro").
   O tema da loja usa variáveis --instantshop-*; aqui elas são redefinidas para o escuro,
   e as regras do tema que usam essas variáveis mudam junto. ===== */

html.dark {
  color-scheme: dark;
  --instantshop-page-bg: #0d0b12;
  --instantshop-surface: #171421;
  --instantshop-surface-alt: #221d30;
  --instantshop-text: #f3f0fa;
  --instantshop-muted: #b3acc4;
  --instantshop-border: #2e2840;
  --bs-body-bg: #0d0b12;
  --bs-body-color: #f3f0fa;
  --bs-border-color: #2e2840;
  --bs-secondary-color: #b3acc4;
  --bs-card-bg: #171421;
}

html.dark body {
  background-color: #0d0b12 !important;
  color: #f3f0fa;
}
html.dark a { color: #c4b5fd; }
html.dark a:hover { color: #ddd6fe; }

/* Barra do topo */
html.dark body #mainnav,
html.dark body .navbar {
  background-color: #0d0b12 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.5) !important;
}
html.dark body #mainnav .navbar-brand,
html.dark body #mainnav .nav-link,
html.dark body .navbar .nav-link,
html.dark body .instantshop-navbar-brand-name,
html.dark body .instantshop-navbar-brand-name > span {
  color: #f3f0fa !important;
}
html.dark body #mainnav .navbar-toggler {
  border-color: rgba(255,255,255,.5) !important;
}

/* Cartões, janelas, menus e listas */
html.dark .card,
html.dark .modal-content,
html.dark .dropdown-menu,
html.dark .offcanvas,
html.dark .list-group-item,
html.dark .accordion-item,
html.dark .accordion-button,
html.dark .instantshop-card,
html.dark .instantshop-product-card-v20,
html.dark .instantshop-product-box,
html.dark .box-white,
html.dark .bg-white,
html.dark .bg-light,
html.dark .vt-card-v400,
html.dark .ir-home-card-v350,
html.dark .ir-game-v333,
html.dark .ir-panel-v327 {
  background-color: #171421 !important;
  color: #f3f0fa !important;
  border-color: #2e2840 !important;
}

/* Campos de formulário */
html.dark .form-control,
html.dark .form-select,
html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
html.dark textarea,
html.dark select {
  background-color: #1d1929 !important;
  color: #f3f0fa !important;
  border-color: #2e2840 !important;
}
html.dark .form-control::placeholder,
html.dark textarea::placeholder,
html.dark input::placeholder {
  color: #8b84a0 !important;
}

/* Botões secundários */
html.dark .btn-light,
html.dark .btn-outline-secondary {
  background-color: #221d30 !important;
  color: #f3f0fa !important;
  border-color: #2e2840 !important;
}

/* Tabelas */
html.dark .table,
html.dark .table > :not(caption) > * > * {
  background-color: transparent;
  color: #f3f0fa;
  border-color: #2e2840;
}

/* Rodapé */
html.dark footer {
  background-color: #08070c !important;
}

/* Destaques da loja e das páginas novas */
html.dark .vt-price-v400,
html.dark .ir-home-price-v350 { color: #c4b5fd !important; }
html.dark .ir-home-head-v350 a { color: #c4b5fd; }
html.dark .vt-disclosure-v400,
html.dark .ir-home-section-v350 small { color: #b3acc4 !important; }

/* Enviador de arquivos (input type="file"): o botão "Escolher arquivo" é um elemento nativo,
   que só pode ser estilizado por CSS. Vale para todas as telas do sistema. */
html.dark input[type="file"] {
  background-color: #1d1929 !important;
  color: #f3f0fa !important;
  border: 1px solid #2e2840 !important;
  border-radius: 10px;
  color-scheme: dark;
}
html.dark input[type="file"]::file-selector-button,
html.dark input[type="file"]::-webkit-file-upload-button {
  background: #2e2840 !important;
  color: #f3f0fa !important;
  border: 1px solid #4b4560 !important;
  border-radius: 8px;
  padding: 6px 14px;
  margin-right: 12px;
  cursor: pointer;
  font-weight: 600;
}
html.dark input[type="file"]::file-selector-button:hover,
html.dark input[type="file"]::-webkit-file-upload-button:hover {
  background: #3a3450 !important;
}
html.dark input[type="file"]::file-selector-button:disabled,
html.dark input[type="file"]::-webkit-file-upload-button:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* Modo escuro (v1.3.0): preço, título e botões de card em branco, sem laranja/preto */
html.dark .instantshop-mobile-product-price-v111 strong,
html.dark .instantshop-card-price,
html.dark .instantshop-price,
html.dark [class*="product-price"] strong,
html.dark [class*="price"] strong,
html.dark .instantshop-mobile-product-card-v111 h3 a,
html.dark .instantshop-card h2 a {
  color: #ffffff !important;
}
html.dark .instantshop-affiliate-btn-v39,
html.dark .instantshop-mobile-product-action-v111,
html.dark .instantshop-card .btn,
html.dark .instantshop-card button,
html.dark .instantshop-card a.btn {
  color: #ffffff !important;
}
