/*
Theme Name: Portal de Eventos Concelhio Theme
Theme URI: https://github.com/antigravity/portal-eventos-concelhio
Description: Tema premium customizado de raiz para o Portal de Eventos Concelhio. Focado em performance, SEO técnico, grid de cartazes e georreferenciação interativa com Leaflet.js.
Version: 1.0.0
Author: PBWriter Studio
Text Domain: portal-eventos-concelhio-theme
*/

/* --- Design Tokens (Sistema de Cores, Tipografia e Efeitos) --- */
:root {
	/* Palette */
	--bg-primary: #0b0f19;
	--bg-secondary: #131a26;
	--bg-tertiary: #1e293b;
	--accent: #6366f1;
	--accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
	--text-primary: #f8fafc;
	--text-secondary: #94a3b8;
	--text-muted: #64748b;
	--success: #10b981;
	--danger: #ef4444;

	/* UI Components */
	--card-bg: rgba(19, 26, 38, 0.6);
	--card-border: rgba(255, 255, 255, 0.08);
	--card-hover-border: rgba(99, 102, 241, 0.4);
	
	/* Layout & Spacing */
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 20px;
	--container-max: 1280px;

	/* Font Stack */
	--font-primary: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
	
	/* Transitions */
	--transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	--transition-fast: all 0.15s ease;
}

/* --- Tema Dia (Light Mode overrides) --- */
body.light-theme {
	--bg-primary: #f8fafc;
	--bg-secondary: #ffffff;
	--bg-tertiary: #e2e8f0;
	--text-primary: #0f172a;
	--text-secondary: #475569;
	--text-muted: #64748b;
	--card-bg: rgba(255, 255, 255, 0.85);
	--card-border: rgba(0, 0, 0, 0.08);
	--card-hover-border: rgba(99, 102, 241, 0.5);
}

body.light-theme .site-footer {
	background: rgba(241, 245, 249, 0.95);
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	color: var(--text-secondary);
}

/* Overrides Globais de Light Mode */
body.light-theme::before {
	background: radial-gradient(circle, rgba(99, 102, 241, 0.04) 0%, transparent 70%);
}
body.light-theme::after {
	background: radial-gradient(circle, rgba(168, 85, 247, 0.03) 0%, transparent 70%);
}

body.light-theme .site-header {
	background: rgba(248, 250, 252, 0.8);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
body.light-theme .main-navigation a {
	color: var(--text-secondary);
}
body.light-theme .main-navigation a:hover, 
body.light-theme .main-navigation li.current-menu-item a {
	color: var(--text-primary);
	text-shadow: none;
}

body.light-theme .filter-select, 
body.light-theme .filter-input,
body.light-theme .form-control {
	background: rgba(255, 255, 255, 0.9);
	border: 1px solid rgba(0, 0, 0, 0.12);
	color: var(--text-primary);
}
body.light-theme .filter-select:focus, 
body.light-theme .filter-input:focus,
body.light-theme .form-control:focus {
	background: #ffffff;
	border-color: var(--accent);
	box-shadow: 0 0 10px rgba(99, 102, 241, 0.12);
}

body.light-theme .event-main-col {
	background: rgba(255, 255, 255, 0.7);
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
}
body.light-theme .event-side-card {
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
}
body.light-theme .info-row {
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
body.light-theme .event-single-content {
	color: #334155;
}

body.light-theme .submission-form-container {
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}
body.light-theme .ai-assistant-wrapper {
	background: rgba(168, 85, 247, 0.02);
	border-color: rgba(168, 85, 247, 0.12);
}
body.light-theme .ai-title {
	color: #7c3aed;
}

body.light-theme .leaflet-tile {
	filter: none !important;
}
body.light-theme .leaflet-popup-content-wrapper {
	background: rgba(255, 255, 255, 0.95) !important;
	backdrop-filter: blur(15px) !important;
	border: 1px solid rgba(0, 0, 0, 0.1) !important;
	color: #0f172a !important;
}
body.light-theme .leaflet-popup-tip {
	background: rgba(255, 255, 255, 0.95) !important;
	border: 1px solid rgba(0, 0, 0, 0.1) !important;
}
body.light-theme .map-popup-title,
body.light-theme .map-popup-date {
	color: #0f172a !important;
}
body.light-theme .map-popup-link {
	color: #ffffff !important;
}

/* Reset Geral & Configuração Base */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	background-color: var(--bg-primary);
	color: var(--text-primary);
	font-family: var(--font-primary);
	line-height: 1.6;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
	text-decoration: none;
	transition: var(--transition-fast);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Scrollbar Otimizada */
::-webkit-scrollbar {
	width: 8px;
}
::-webkit-scrollbar-track {
	background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
	background: var(--bg-tertiary);
	border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
	background: var(--accent);
}
