/*
Theme Name: WeTell
Description: Modern WordPress theme for WeTell audio platform with Vite + TypeScript + Tailwind CSS
Version: 2.0.7
Author: WeTell Development Team
Text Domain: wetell
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: MIT
*/

/* This file contains only complex CSS that can't be easily replicated with Tailwind */
/* Most styles have been migrated to Tailwind CSS classes */

:root {
  --color-positive: #69ff9b;
  --color-neutral: #808080;
  --color-negative: #ff6969;
  --color-ktf: #00e3f4;
  --color-infrastructure: #00aaff;
  --color-laender: #7600ff;
  --max-width: 1400px;
}
/* 
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #000000;
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
} */

/* Container - MIGRATED to Tailwind: w-full max-w-container mx-auto px-4 md:px-8 */
/* (mobile: 1rem padding / desktop: 2rem padding, max-width: 1400px via @theme) */
/* Horizontal Chart System - MIGRATED to Tailwind */
/* Vertical Bar Charts Container - Migrated to Tailwind */
/* Grid positioning (chart-2025, chart-2026, etc.) - Migrated to Tailwind */
/* Mobile scale - Migrated to Tailwind */
/* Grid bars - Migrated to Tailwind */
/* Data bars - Migrated to Tailwind */
/* Data segments responsive - Migrated to Tailwind */

.mobile-scale-bar {
  display: none;
}

@media (max-width: 576px) {
  .mobile-scale-bar {
    display: block;
    margin: 2rem auto 3rem;
    padding: 0 1rem;
  }

  .mobile-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.625rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.5rem;
  }

  .mobile-scale-visual {
    height: 50px;
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
  }

  .mobile-scale-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 600;
  }

  .mobile-scale-segment.ktf {
    width: 15.6%;
    background: var(--color-ktf);
  }

  .mobile-scale-segment.infrastructure {
    width: 29.6%;
    background: var(--color-infrastructure);
  }

  .mobile-scale-segment.laender {
    width: 13%;
    background: var(--color-laender);
  }

  .mobile-scale-segment.extra {
    width: 41.8%;
    background: #8a2be2;
  }
}

/* Grid bar, data bar, data segment - All migrated to Tailwind */

/* Sankey Styles */
.link {
  fill: none;
  stroke-opacity: 0.5;
}

.link:hover {
  stroke-opacity: 0.8;
}

.node rect {
  cursor: pointer;
  shape-rendering: crispEdges;
}

.node text {
  pointer-events: none;
  font-family: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Only apply to Sankey diagrams, not all SVGs (e.g., password lock icon) */
.year-sankey-container svg,
#sankey-diagram svg,
.sankey-container svg {
  width: 100%;
  height: 100%;
}

.link {
  fill-opacity: 1;
  stroke: none;
}

.node-label {
  fill: white;
  font-size: 13px;
  font-family: "Source Sans Pro", Arial, sans-serif;
  pointer-events: none;
}

.climate-node-label {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 152px;
  padding: 10px;
  height: auto;
  box-sizing: border-box;
  font-size: 12px;
  font-weight: 500;
  color: #ffffff;
  pointer-events: none;
  z-index: 10;
  border-radius: 4px;
  white-space: pre-wrap;
  text-align: center;
}

@media (max-width: 768px) {
  .climate-node-label {
    width: 90px !important;
    height: auto !important;
    padding: 3px 5px;
    font-size: 9px;
    line-height: 1.2;
  }
}

@media (max-width: 480px) {
  .climate-node-label {
    width: 70px !important;
    padding: 2px 4px;
    font-size: 8px;
  }
}

.climate-node-label .icon {
  margin-right: 4px;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.climate-node-label .text {
  flex: 1;
  text-align: center;
  padding: 0 2px;
}

@media (max-width: 768px) {
  .climate-node-label .text {
    font-size: inherit;
    padding: 0;
  }
}

.climate-node-label.positive {
  background-color: var(--color-positive);
  color: #000000;
}

.climate-node-label.neutral {
  background-color: #000000;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.climate-node-label.negative {
  background-color: var(--color-negative);
  color: #ffffff;
}

/* KTF Years Charts */
.ktf-years-charts {
  display: flex;
  align-items: flex-end;
  gap: 2rem;
  margin-top: 2rem;
}

.ktf-years-charts .vertical-scale {
  display: flex;
  flex-direction: column-reverse;
  justify-content: space-between;
  height: 300px;
  margin-right: 1rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1;
}

.ktf-years-charts .charts-grid-container {
  display: flex;
  gap: 2rem;
  flex: 1;
  justify-content: space-around;
}

@media (max-width: 992px) {
  .ktf-years-charts .charts-grid-container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.5rem;
    justify-items: center;
  }
}

@media (max-width: 576px) {
  .ktf-years-charts .charts-grid-container {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }
}

/* Yearly Sections */
.year-section {
  padding: 60px 0;
}

.year-section .container {
  position: relative;
}

.year-header {
  margin-bottom: 3rem;
}

.year-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  line-height: 1;
}

/* Accordion Styles */
.accordion-header {
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.year-title-wrapper {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 50px;
}

.accordion-chevron {
  transition: transform 0.3s ease;
  color: #ffffff;
  opacity: 0.7;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.accordion-header.active .accordion-chevron {
  transform: rotate(180deg);
}

.year-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
}

.year-content.active {
  max-height: none;
}

@media (max-width: 768px) {
  .year-title-wrapper {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }

  .year-title {
    font-size: 2rem;
    margin-bottom: 0;
  }
}

/* Climate Metrics Section */
.climate-metrics-section {
  margin-bottom: 100px;
}

/* Year Sankey Section */
.year-sankey-section {
  margin-bottom: 100px;
}

.year-sankey-section .sankey-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 100px;
  line-height: 1.4;
}

.year-sankey-container {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: visible;
}

.year-sankey-container svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* JS state classes */
/* Accordion icon changes handled by JavaScript (+ to -) */

.data-table-container.active {
  display: block;
}

/* Active state for toggle buttons - icon changes handled by JavaScript (+ to -) */
.data-toggle-btn.active .toggle-icon {
  /* Removed rotation - JS changes icon text instead */
}

/* Climate Donut Charts */
.climate-donut-charts {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

@media (max-width: 1200px) {
  .climate-donut-charts {
    flex-direction: column;
    align-items: center;
  }
}

.donut-chart {
  width: 100%;
  display: block;
}

.donut-chart svg {
  width: 100%;
  height: auto;
  display: block;
  scale: 1.06;
}

/* KTF Segment Patterns - 5 Level System */

.data-segment.pattern-level1,
.data-segment.pattern-solid {
  /* Background color applied via inline style */
}

.data-segment.pattern-level2,
.data-segment.pattern-level3,
.data-segment.pattern-level4,
.data-segment.pattern-level5 {
  background-color: transparent !important;
  position: relative;
}

.data-segment.pattern-level2::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
    circle,
    var(--segment-color, #00b8c5) 3.5px,
    transparent 3.5px
  );
  background-size: 7px 7px;
  background-position: 0 0;
  pointer-events: none;
}

.data-segment.pattern-level3::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
    circle,
    var(--segment-color, #00b8c5) 2.5px,
    transparent 2.5px
  );
  background-size: 9px 9px;
  background-position: 0 0;
  pointer-events: none;
}

.data-segment.pattern-level4::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
    circle,
    var(--segment-color, #00b8c5) 0.5px,
    transparent 0.5px
  );
  background-size: 3px 3px;
  background-position: 0 0;
  pointer-events: none;
}

.data-segment.pattern-level5::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: radial-gradient(
    circle,
    var(--segment-color, #00b8c5) 0.5px,
    transparent 0.5px
  );
  background-size: 3px 3px;
  background-position: 0 0;
  pointer-events: none;
}

.data-segment.pattern-dots {
  background-image: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.3) 2px,
    transparent 2px
  );
  background-size: 8px 8px;
}

.data-segment.pattern-lines {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.3) 25%,
    transparent 25%,
    transparent 75%,
    rgba(255, 255, 255, 0.3) 75%
  );
  background-size: 6px 6px;
}

/* Segment title and value styles migrated to Tailwind */

/* Global list styles - all ul/li have disc bullets by default */
ul {
  list-style: disc;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Override for metric-content - custom colored bullets */
.metric-content ul {
  list-style: none;
  padding: 0;
}

.metric-content li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.625rem;
}

.metric-content li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--metric-color, #666);
  font-size: 16px;
}
