/* Default Light Theme Styles for template (header, footer, settings menu) */
body.template-body-style {
    font-family: 'Inter', sans-serif;
    background-color: #F1F5F9; /* slate-100 */
    color: #0F172A; /* slate-900 */
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    scroll-behavior: smooth;
}
/* Added to prevent scrolling when a panel is open */
body.panel-open {
    overflow: hidden;
}
.new-html-content-wrapper {
     /* Styles for the main content area if needed */
}

header.app-header {
    background-color: #E2E8F0; /* slate-200 (Light mode default) */
    transition: background-color 0.3s ease;
}
.nav-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.875rem; /* text-sm */
    color: #1E293B; /* slate-800 */
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
.nav-dropdown-item svg:not([class*="text-"]):not(#animations-menu-icon-svg):not(.page-nav-icon-svg) {
    width: 1.25rem; /* w-5 */
    height: 1.25rem; /* h-5 */
    margin-right: 0.5rem;
    color: #0284C7; /* sky-600 */
}
.nav-dropdown-item .theme-checkmark svg {
     color: #0ea5e9; /* sky-500 */
}
.nav-dropdown-item:hover {
    background-color: #E2E8F0; /* slate-200 */
    color: #0369A1; /* sky-700 */
}

footer {
    border-top-color: #CBD5E1; /* slate-300 */
    transition: border-color 0.3s ease;
    background-color: #E2E8F0; /* slate-200 */
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.footer-text-secondary { color: #64748B; /* slate-500 */ }

.site-logo { height: 32px; width: auto; margin-right: 0.5rem; }
.settings-divider { border-top: 1px solid #CBD5E1; /* slate-300 */ margin-top: 0.25rem; margin-bottom: 0.25rem; }

.toggle-switch-label { display: flex; align-items: center; cursor: pointer; }
.toggle-switch-checkbox { opacity: 0; width: 0; height: 0; }
.toggle-switch-checkbox:disabled + .toggle-switch-slider { background-color: #9CA3AF; cursor: not-allowed; }
.toggle-switch-checkbox:disabled + .toggle-switch-slider::before { background-color: #E5E7EB; }
#animations-toggle-link.disabled-link { opacity: 0.5; cursor: not-allowed; }


.toggle-switch-slider { width: 2.5rem; height: 1.25rem; background-color: #D1D5DB; /* gray-300 */ border-radius: 9999px; position: relative; transition: background-color 0.2s ease-in-out; }
.toggle-switch-slider::before { content: ''; position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem; background-color: white; border-radius: 9999px; transition: transform 0.2s ease-in-out; }
.toggle-switch-checkbox:checked + .toggle-switch-slider { background-color: #2563EB; /* blue-600 */ }
.toggle-switch-checkbox:checked + .toggle-switch-slider::before { transform: translateX(1.25rem); }

.header-icon { /* Standard light mode header icon */
    color: #334155; /* slate-700 */
    transition: color 0.2s ease-in-out;
}
.header-icon:hover {
    color: #0EA5E9; /* sky-500 */
}
.header-icon svg { fill: currentColor; }
.header-icon svg.stroked-icon { fill: none; stroke: currentColor; }

#settings-button:hover { /* Standard light mode settings button hover */
    background-color: #E2E8F0; /* slate-200 */
}

/* Dark Mode Overrides for template */
html.dark body.template-body-style { background-color: #0F172A; color: #F8FAFC; }
html.dark header.app-header { background-color: #1E293B; } /* Dark mode header background */

html.dark .nav-dropdown-item { color: #CBD5E1; }
html.dark .nav-dropdown-item svg:not([class*="text-"]):not(#animations-menu-icon-svg):not(.page-nav-icon-svg) { color: #38BDF8; }
html.dark .nav-dropdown-item .theme-checkmark svg { color: #38bdf8; }
html.dark .nav-dropdown-item:hover { background-color: #334155; color: #38BDF8; }

html.dark footer { border-top-color: #334155; background-color: #1E293B; }
html.dark .settings-divider { border-top-color: #334155; }
html.dark .toggle-switch-slider { background-color: #4B5563; }
html.dark .toggle-switch-checkbox:checked + .toggle-switch-slider { background-color: #3B82F6; }
html.dark .toggle-switch-checkbox:disabled + .toggle-switch-slider { background-color: #374151; }
html.dark .toggle-switch-checkbox:disabled + .toggle-switch-slider::before { background-color: #4B5563; }

html.dark .header-icon { /* Dark mode header icon */
    color: #CBD5E1;
}
html.dark .header-icon:hover {
    color: #38BDF8;
}
 html.dark #settings-button:hover { /* Dark mode settings button hover */
    background-color: #334155;
}


.theme-checkmark svg {
    color: #0ea5e9; /* sky-500 */
}
html.dark .theme-checkmark svg {
    color: #38bdf8; /* sky-400 */
}

.animations-icon-svg {
    transition: transform 0.3s ease, stroke 0.3s ease;
}
.animations-icon-svg.animate-active {
    animation: explosion-effect 2s infinite ease-in-out,
               rainbow-stroke-wave-direct 3s infinite linear;
}
@keyframes explosion-effect {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    25% { transform: scale(1.6) rotate(45deg); opacity: 0.7; }
    50% { transform: scale(0.7) rotate(-45deg); opacity: 1; }
    75% { transform: scale(1.3) rotate(15deg); opacity: 0.8; }
}
@keyframes rainbow-stroke-wave-direct {
    0%   { stroke: #FF0000; } 14%  { stroke: #FFA500; } 28%  { stroke: #FFFF00; } 42%  { stroke: #008000; }
    57%  { stroke: #0000FF; } 71%  { stroke: #4B0082; } 85%  { stroke: #EE82EE; } 100% { stroke: #FF0000; }
}
.animations-icon-svg:not(.animate-active) { stroke: #bd10e0; } /* Light mode default */
html.dark .animations-icon-svg:not(.animate-active) { stroke: #d946ef; } /* Dark mode default */


/* Styles for ip-information main content */
.info-card {
     background-color: #FFFFFF;
}
html.dark .info-card {
    background-color: #1E293B;
}

html.dark .info-card .text-slate-500 { color: #94A3B8; }
html.dark .info-card .text-slate-700 { color: #CBD5E1; }
html.dark .info-card .text-slate-600 { color: #94A3B8; }
html.dark .info-card .bg-slate-50 { background-color: #334155; }
html.dark .info-card .text-sky-500 { color: #38BDF8; }
html.dark .info-card .text-sky-600 { color: #7DD3FC; }
html.dark .info-card .hover\:text-sky-700:hover { color: #0EA5E9; }
html.dark .info-card .disclaimer-text { color: #94A3B8; }
html.dark .info-card .country-flag { border-color: #4A5568; }
html.dark #error-message {
    background-color: #552E2E;
    border-color: #F87171;
    color: #FECACA;
}
html.dark #error-message .font-bold { color: #FEE2E2; }


.leaflet-pane {
    z-index: 1;
}
.leaflet-top, .leaflet-bottom {
    z-index: 2;
}
.disclaimer-text {
    font-size: 0.8rem;
}
.country-flag {
    width: 40px;
    height: auto;
    border: 1px solid #eee;
    border-radius: 4px;
}
main.content-host {
    /* Add specific styles if needed */
}

/* === START: Animated Border Styles === */
@property --rainbow-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes rainbow-chase-feedback-animation { to { --rainbow-angle: 360deg; } }
@keyframes aura-pulse-effect {
    0%   { box-shadow: 0 0 15px 4px rgba(239, 68, 68, 0.35), 0 0 30px 8px rgba(239, 68, 68, 0.2); }
    17%  { box-shadow: 0 0 15px 4px rgba(249, 115, 22, 0.35), 0 0 30px 8px rgba(249, 115, 22, 0.2); }
    33%  { box-shadow: 0 0 15px 4px rgba(234, 179, 8, 0.35), 0 0 30px 8px rgba(234, 179, 8, 0.2); }
    50%  { box-shadow: 0 0 15px 4px rgba(34, 197, 94, 0.35), 0 0 30px 8px rgba(34, 197, 94, 0.2); }
    67%  { box-shadow: 0 0 15px 4px rgba(59, 130, 246, 0.35), 0 0 30px 8px rgba(59, 130, 246, 0.2); }
    83%  { box-shadow: 0 0 15px 4px rgba(139, 92, 246, 0.35), 0 0 30px 8px rgba(139, 92, 246, 0.2); }
    100% { box-shadow: 0 0 15px 4px rgba(239, 68, 68, 0.35), 0 0 30px 8px rgba(239, 68, 68, 0.2); }
}

.animated-rainbow-border-container {
    padding: 3px;
    border-radius: 0.5rem; /* rounded-lg */
    background: conic-gradient(from var(--rainbow-angle), #ef4444, #f97316, #eab308, #22c55e, #3b82f6, #6366f1, #8b5cf6, #ef4444);
    animation: rainbow-chase-feedback-animation 3s linear infinite, aura-pulse-effect 6s ease-in-out infinite;
    position: relative;
}

.animated-rainbow-border-container.animations-disabled {
    animation: none !important;
    background: transparent !important;
    border: 2px solid #dc2626; /* red-600 */
    padding: 1px;
    box-shadow: none !important;
}

html.dark .animated-rainbow-border-container.animations-disabled {
    border-color: #f87171; /* red-400 */
}

.location-inner-content {
    border-radius: calc(0.5rem - 3px);
    width: 100%;
    background-color: #f8fafc; /* Corresponds to bg-slate-50 */
    transition: background-color 0.3s ease;
}

.animated-rainbow-border-container.animations-disabled .location-inner-content {
     border-radius: calc(0.5rem - 2px);
}

html.dark .location-inner-content {
    background-color: #334155;
}
/* === END: Animated Border Styles === */

/* Styles for the new infographic section */
.infographic-card {
    background-color: #FFFFFF;
    transition: background-color 0.3s ease, color 0.3s ease;
}
html.dark .infographic-card {
    background-color: #1E293B; /* slate-800 */
}
.infographic-card h3 {
    color: #0F172A; /* slate-900 */
}
html.dark .infographic-card h3 {
    color: #F1F5F9; /* slate-100 */
}
.infographic-card p, .infographic-card li {
    color: #475569; /* slate-600 */
}
html.dark .infographic-card p, html.dark .infographic-card li {
    color: #94A3B8; /* slate-400 */
}
.infographic-card ul {
    list-style-position: inside;
}
.infographic-card .pro-con-list li::before {
    font-weight: 700;
    margin-right: 0.5rem;
}
.infographic-card .pros li::before {
    content: '+';
    color: #22C55E; /* green-500 */
}
.infographic-card .cons li::before {
    content: '−';
    color: #EF4444; /* red-500 */
}

/* Helper class for initially hidden elements that JS will reveal */
.hidden {
    display: none;
}

/* --- NEW STYLES FOR SIDE PANELS --- */
.panel-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); z-index: 70;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
.panel-overlay.active { opacity: 1; visibility: visible; }

.side-panel {
    position: fixed; top: 0; height: 100%; width: 90vw; max-width: 420px;
    background-color: #FFFFFF; z-index: 80;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease-in-out;
    display: flex; flex-direction: column; overflow-y: auto;
}
html.dark .side-panel { background-color: #1E293B; }

.side-panel.left { left: 0; transform: translateX(-100%); }
.side-panel.right { right: 0; transform: translateX(100%); }
.side-panel.open { transform: translateX(0); }

.side-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem; border-bottom: 1px solid #E2E8F0;
}
html.dark .side-panel-header { border-bottom-color: #334155; }

.side-panel-title { font-size: 1.375rem; font-weight: 600; color: #1E293B; }
html.dark .side-panel-title { color: #E2E8F0; }

.panel-close-button {
    background: none; border: none; cursor: pointer; padding: 0.5rem;
    color: #64748B; transition: color 0.2s ease, transform 0.2s ease;
}
.panel-close-button:hover { color: #EF4444; transform: rotate(90deg); }
html.dark .panel-close-button { color: #94A3B8; }
html.dark .panel-close-button:hover { color: #F87171; }

.side-panel-content { padding: 0.5rem 0; flex-grow: 1; }
.side-panel .nav-dropdown-item { font-size: 1rem; padding: 0.75rem 1.5rem; }
.side-panel .dropdown-menu-header-text {
    font-size: 0.875rem; font-weight: 600; padding: 0.75rem 1.5rem 0.5rem;
}

#menu-button { margin-right: 0.5rem; }
