/*
Theme Name: Câmara Municipal de Patrocínio
Theme URI: https://wa.me/5511953312499?text=Ol%C3%A1%20Lucas%2C%20preciso%20da%20sua%20ajuda%20no%20site%20da%20C%C3%A2mara%20Municipal%20de%20Patroc%C3%ADnio
Author: Lucas Pereira Dias Lopes
Author URI: https://wa.me/5511953312499?text=Ol%C3%A1%20Lucas%2C%20preciso%20da%20sua%20ajuda%20no%20site%20da%20C%C3%A2mara%20Municipal%20de%20Patroc%C3%ADnio
Description: Tema institucional super rápido e moderno, feito com Tailwind CSS em 2026.
Version: 1.0.0
Text Domain: cmpatrocinio
*/

:root {
  --cmp-primary: #231f20;
  --cmp-primary-deep: #111111;
  --cmp-text: #333333;
  --cmp-surface: #f8f9fa;
}

/* ==========================================================================
   Sobrescritas Globais
   ========================================================================== */

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--cmp-text);
  background-color: var(--cmp-surface);
}

/* ==========================================================================
   Botões Globais & Gutenberg
   ========================================================================== */

/* Aplica o estilo apenas para inputs de formulário do WP (ex: Buscar, Comentários) e blocos Gutenberg */
input[type="submit"],
input[type="button"],
.wp-block-button__link:not(.has-background),
.wp-block-file__button {
  background-color: var(--cmp-primary);
  color: #ffffff !important;
  font-weight: 500;
  border-radius: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  border: 1px solid var(--cmp-primary);
  cursor: pointer;
  text-decoration: none !important;
  display: inline-block;
  line-height: 1.5;
  text-align: center;
}

input[type="submit"]:hover,
input[type="button"]:hover,
.wp-block-button__link:not(.has-background):hover,
.wp-block-file__button:hover {
  background-color: var(--cmp-primary-deep);
  border-color: var(--cmp-primary-deep);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

input[type="submit"]:focus,
.wp-block-button__link:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(35, 31, 32, 0.2);
}

/* Tratativa Específica para Botões estilo "Outline" gerados nativamente pelo WordPress Gutenberg */
.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent !important;
  color: var(--cmp-primary) !important;
  border: 2px solid var(--cmp-primary);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--cmp-primary) !important;
  color: #ffffff !important;
}

/* Forçar estilo correto se o botão for gerado dentro de um texto (Gutenberg Prose) */
.prose .wp-block-button__link {
  color: #ffffff !important;
  text-decoration: none !important;
}

/* ==========================================================================
   Consistência de Cores em Elementos Nativos e Blocos Gutenberg
   ========================================================================== */

/* Cores de Seleção */
::selection {
  background-color: rgb(255 242 0 / 60%);
  color: #000000;
}

/* Formulários, Inputs e Textareas nativos */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
  border: 1px solid rgba(35, 31, 32, 0.2);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s ease;
  background-color: #ffffff;
  color: var(--cmp-text);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--cmp-primary);
  box-shadow: 0 0 0 3px rgba(35, 31, 32, 0.15); /* #231f20 com 15% opacidade */
}

/* Citações Nativas do WP (Blockquotes) */
blockquote, 
.wp-block-quote {
  border-left: 4px solid var(--cmp-primary) !important;
  background-color: rgba(35, 31, 32, 0.03) !important;
  padding: 1.5rem !important;
  border-radius: 0 0.5rem 0.5rem 0 !important;
  color: rgba(35, 31, 32, 0.8) !important;
  font-style: italic;
}

/* Separadores Nativos (HR) */
hr, 
.wp-block-separator {
  border: 0;
  border-top: 1px solid rgba(35, 31, 32, 0.1) !important;
}

/* Tabelas Nativas do Gutenberg */
.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
}

.wp-block-table th, 
.wp-block-table td {
  border: 1px solid rgba(35, 31, 32, 0.1) !important;
  padding: 0.75rem;
}

.wp-block-table th {
  background-color: rgba(35, 31, 32, 0.05) !important;
  font-weight: 600;
  color: var(--cmp-primary);
}

/* Legendas de imagens do Gutenberg */
.wp-block-image figcaption {
  color: rgba(35, 31, 32, 0.6) !important;
  font-size: 0.875rem !important;
}

/* Header & Topbar Customizations */
.site-header {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Paginação do WordPress (Adaptada para Tailwind/Flowbite) */
.pagination-wrapper .nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.pagination-wrapper .page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cmp-text);
  background-color: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.pagination-wrapper .page-numbers:hover {
  background-color: #f9fafb;
  color: var(--cmp-primary);
  text-decoration: none;
}

.pagination-wrapper .page-numbers.current {
  background-color: var(--cmp-primary);
  color: #fff;
  border-color: var(--cmp-primary);
}

.pagination-wrapper .screen-reader-text {
  display: none;
}

/* Removendo a classe .prose-custom antiga pois agora usamos o @tailwindcss/typography oficial */

.transition-hover {
  transition: all 0.3s ease;
}

.transition-hover:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.topbar .nav-link {
  font-size: 0.85rem;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.topbar .nav-link:hover {
  opacity: 1;
}

.topbar-nav {
  gap: 0.5rem;
}

.brand-logo {
  max-width: 200px;
  height: auto;
  flex-shrink: 0;
  display: block;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--cmp-text) !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-link.active {
  color: var(--cmp-primary) !important;
}

/* ==========================================================================
   Estilos de Comentários do WordPress
   ========================================================================== */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-list .comment {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.comment-list .children {
  list-style: none;
  padding-left: 1.5rem;
  margin-top: 1.5rem;
  border-left: 2px solid #e5e7eb;
}

@media (min-width: 768px) {
  .comment-list .children {
    padding-left: 2.5rem;
  }
}

.comment-author {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
}

.comment-author img {
  border-radius: 9999px;
  margin-right: 1rem;
  width: 48px;
  height: 48px;
}

.comment-author cite {
  font-style: normal;
  font-weight: 700;
  color: #111827;
}

.comment-author cite a {
  color: #111827;
}

.comment-metadata {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
  display: block;
}

.comment-metadata a {
  color: #6b7280;
}

.comment-content {
  color: #374151;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.comment-content p {
  margin-bottom: 0.5rem;
}

.reply a {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cmp-primary);
  background: #f3f4f6;
  padding: 0.35rem 0.75rem;
  border-radius: 0.375rem;
  transition: background 0.2s;
}

.reply a:hover {
  background: #e5e7eb;
  text-decoration: none;
}

/* Formulário de Comentário */
.comment-form p {
  margin-bottom: 1.25rem;
}

.comment-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #111827;
  background-color: #ffffff;
  transition: all 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--cmp-primary);
  box-shadow: 0 0 0 3px rgba(35, 31, 32, 0.1);
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form .comment-notes,
.comment-form .logged-in-as {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.comment-form-cookies-consent input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
}

.comment-form-cookies-consent label {
  font-weight: 400;
  color: #6b7280;
}

@media (max-width: 768px) {
  .topbar {
    font-size: 0.8rem;
  }
  .topbar-nav .nav-item {
    margin-bottom: 0.25rem;
  }
}
