/**
 * GeoIBRAM Footer - Design System v2.0
 * 
 * Estilos para o footer do sistema
 * 
 * @package GeoIBRAM_Theme
 * @version 2.0.0
 */

/* ============================================
   FOOTER GLOBAL
   ============================================ */

.geoibram-footer {
  padding: 16px 24px;
  background: #FFFFFF;
  border-top: 1px solid #E5E7EB;
  text-align: center;
}

.geoibram-footer p {
  font-size: 12px;
  color: #6B7280;
  margin: 0;
}

.geoibram-footer a {
  color: var(--theme-primary, #43A047);
  text-decoration: none;
  font-weight: 500;
}

.geoibram-footer a:hover {
  text-decoration: underline;
}

/* Footer dentro do layout com sidebar */
@media (min-width: 1024px) {
  .admin-template .geoibram-footer,
  .produtor-theme .geoibram-footer,
  .apicultor-theme .geoibram-footer,
  .operador-theme .geoibram-footer,
  .admin-theme .geoibram-footer,
  .cidadao-theme .geoibram-footer {
    margin-left: 0;
  }
}

/* ============================================
   CORES DO FOOTER POR TIPO DE USUÁRIO
   ============================================ */

/* Produtor Rural - Verde */
.user-theme-produtor .geoibram-footer a,
.produtor-theme .geoibram-footer a {
  color: #43A047;
}

/* Apicultor - Amarelo */
.user-theme-apicultor .geoibram-footer a,
.apicultor-theme .geoibram-footer a {
  color: #F9A825;
}

/* Operador Drone - Azul */
.user-theme-operador .geoibram-footer a,
.operador-theme .geoibram-footer a {
  color: #1976D2;
}

/* Administrador - Roxo */
.user-theme-admin .geoibram-footer a,
.user-theme-adm .geoibram-footer a,
.user-theme-adm .geoibram-site-footer a,
.user-theme-admin .geoibram-site-footer a,
.admin-theme .geoibram-footer a {
  color: #7C3AED;
}

/* Apicultor - Amarelo (site footer SPA) */
.user-theme-apicultor .geoibram-site-footer a,
.user-theme-apicultor .geoibram-site-footer .text-primary,
.apicultor-theme .geoibram-site-footer a {
  color: #f59e0b;
}

/* Produtor - Verde */
.user-theme-produtor .geoibram-site-footer a,
.user-theme-produtor .geoibram-site-footer .text-primary,
.produtor-theme .geoibram-site-footer a {
  color: #22c55e;
}

/* Operador - Azul */
.user-theme-operador .geoibram-site-footer a,
.user-theme-operador-drone .geoibram-site-footer a,
.operador-theme .geoibram-site-footer a {
  color: #2196F3;
}

/* Cidadão */
.user-theme-cidadao .geoibram-site-footer a,
.cidadao-theme .geoibram-site-footer a {
  color: #64748b;
}

/* Cidadão - Laranja */
.user-theme-cidadao .geoibram-footer a,
.cidadao-theme .geoibram-footer a {
  color: #F97316;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (max-width: 768px) {
  .geoibram-footer {
    padding: 12px 16px;
  }
  
  .geoibram-footer p {
    font-size: 11px;
  }
}

/* Mobile: rodapé do site (IBRAM Brasil / Estúdio Compilart) sempre visível acima da barra inferior */
@media (max-width: 768px) {
  .geoibram-site-footer {
    padding-bottom: 5rem !important;
  }
  .geoibram-site-footer .geoibram-footer-inner {
    padding-bottom: 0.25rem;
  }
}

@media (max-width: 480px) {
  .geoibram-footer {
    padding: 10px 12px;
  }
  
  .geoibram-footer p {
    font-size: 10px;
  }
}

/* ============================================
   RODAPÉ SITE (IBRAM / ESTÚDIO COMPILART)
   ============================================ */

/* Desktop/notebook: centralizar em relação ao conteúdo da página (mesmo eixo dos botões Voltar/Próximo).
   O footer é injetado pelo wp_footer fora da coluna de conteúdo; em layout com sidebar ele ocupa
   a viewport inteira. Para alinhar ao centro do conteúdo, limitamos o footer à mesma faixa da coluna. */
@media (min-width: 769px) {
  .geoibram-site-footer {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .geoibram-site-footer .geoibram-footer-inner {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
    width: 100%;
    text-align: center;
  }
}

/* Desktop com sidebar LEGADO: footer injetado fora do app-shell (filho direto do body).
   No SPA v3 o rodapé fica dentro de .geoibram-content-column — NÃO aplicar margin-left. */
@media (min-width: 1024px) {
  body:not(.geoibram-spa-shell).admin-template > .geoibram-site-footer,
  body:not(.geoibram-spa-shell).user-theme-cidadao > .geoibram-site-footer,
  body:not(.geoibram-spa-shell).cidadao-theme > .geoibram-site-footer,
  body:not(.geoibram-spa-shell).user-theme-produtor > .geoibram-site-footer,
  body:not(.geoibram-spa-shell).produtor-theme > .geoibram-site-footer,
  body:not(.geoibram-spa-shell).user-theme-apicultor > .geoibram-site-footer,
  body:not(.geoibram-spa-shell).apicultor-theme > .geoibram-site-footer,
  body:not(.geoibram-spa-shell).user-theme-operador > .geoibram-site-footer,
  body:not(.geoibram-spa-shell).user-theme-operador-drone > .geoibram-site-footer,
  body:not(.geoibram-spa-shell).operador-theme > .geoibram-site-footer {
    margin-left: 16rem !important;
    width: calc(100% - 16rem) !important;
    max-width: none !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    box-sizing: border-box !important;
  }
}

/* SPA v3: rodapé dentro da coluna de conteúdo — largura total, centralizado (todos os papéis) */
body.geoibram-spa-shell .geoibram-content-column .geoibram-site-footer,
body.geoibram-spa-shell .geoibram-spa-content-area > .geoibram-site-footer {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

body.geoibram-spa-shell .geoibram-content-column .geoibram-footer-inner {
  margin-left: auto !important;
  margin-right: auto !important;
  width: 100% !important;
  max-width: 80rem !important;
  text-align: center !important;
}

/* Rodapé site: <br> oculto no desktop = uma linha; <br> visível no mobile = duas linhas */
.geoibram-site-footer .geoibram-footer-compilart-br {
  display: none !important;
}
@media (max-width: 768px) {
  .geoibram-site-footer .geoibram-footer-compilart-br {
    display: block !important;
  }
}

