/* ===== groomingStatistics.css ===== */

/* ===== GLOBAL RESET ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ===== ROOT VARIABLES ===== */
:root {
  --text-color: #000000;
  --background: #ffffff;
  --accent-blue: #42b8e7;
  --accent-red: #f06b6b;
  --accent-gray: #a0a0a0;
  --glass-white: rgba(158, 208, 231, 0.24);
  --jet-black: #000000;
  --border-color: rgba(0, 0, 0, 0.8);
  --transition-speed: 0.3s;
  --heading-font: 'Orbitron', sans-serif;
  --body-font: 'Roboto', sans-serif;
  --bg-image: url('/assets/images/background1.jpg'); /* Update if needed */
}

/* ===== BODY STYLES ===== */
html, body {
  width: 100%;
  height: 100%;
  font-family: var(--body-font);
  background: var(--background);
  color: var(--text-color);
  overflow-x: hidden;
}

body {
  background-image: var(--bg-image);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
}

/* ===== GLOBAL FONT STYLES ===== */
h1, h2, h3, h4, .page-title {
  font-family: var(--heading-font);
  font-weight: 900;
  color: black;
  text-shadow: 2px 2px 5px rgba(221, 216, 216, 0.6);
}

/* BOLD & 3D TEXT INSIDE BOXES */
.glass-box p {
  font-weight: 900;
  font-size: 1.1rem;
  color: black;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* ===== HEADER ===== */
.site-header {
  background: var(--glass-white);
  border-bottom: 2px solid var(--jet-black);
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}
.site-title {
  font-size: 2rem;
  font-weight: 900;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.6);
}

/* ===== MAIN CONTAINER ===== */
.main-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--glass-white);
  border-top: 2px solid var(--jet-black);
  padding: 1rem;
  text-align: center;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.6);
}
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-links a {
  color: var(--jet-black);
  text-decoration: none;
  font-weight: 700;
}

/* ===== SECTIONS & HEADINGS ===== */
.section {
  margin-bottom: 40px;
}
.page-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.stat-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  border-radius: 8px;
}

.stat-box h4 {
  color: #000;
  font-weight: 900;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.stat-box ul {
  list-style-type: none;
  padding-left: 1.5rem;
}

.stat-box ul li {
  position: relative;
  padding: 0.5rem 0;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.stat-box ul li::before {
  content: "•";
  color: #f06b6b;
  font-weight: bold;
  position: absolute;
  left: -1.5rem;
  top: 0.5rem;
}

.selection-controls {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.age-selection, .factor-selection {
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  border-radius: 8px;
}

.age-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.age-button, .risk-button {
  padding: 1rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: all 0.3s ease;
}

.age-button.selected, .risk-button.selected {
  background: rgba(66, 184, 231, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.risk-result {
  background: rgba(255, 255, 255, 0.15);
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
}

.risk-level {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.risk-percentage {
  font-size: 2.5rem;
  font-weight: 900;
}

.risk-label {
  font-size: 1.2rem;
  font-weight: 700;
}

.risk-detail {
  margin: 1rem 0;
  font-size: 1.1rem;
}

.risk-actions {
  text-align: left;
  margin-top: 1rem;
}

.risk-actions ul {
  list-style-type: none;
  padding-left: 0;
}

.risk-actions li {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.risk-actions li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #f06b6b;
}

.low-risk { background: rgba(0, 255, 0, 0.2); }
.medium-risk { background: rgba(255, 255, 0, 0.2); }
.high-risk { background: rgba(255, 165, 0, 0.2); }
.critical-risk { background: rgba(255, 0, 0, 0.2); }

.risk-factor-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.risk-level {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 1px solid #000;
}

.color-box.low { background: rgba(0, 255, 0, 0.85); }
.color-box.medium { background: rgba(255, 255, 0, 0.85); }
.color-box.high { background: rgba(255, 165, 0, 0.85); }
.color-box.critical { background: rgba(255, 0, 0, 0.85); }

/* ===== GLASS BOXES ===== */
.glass-box {
  background: var(--glass-white);
  backdrop-filter: blur(6px);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.6);
  transition: transform var(--transition-speed);
}
.glass-box:hover {
  transform: translateY(-5px);
}

/* ===== CHART SECTIONS ===== */
.chart-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}
.chart-box {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 12px;
  transform: perspective(800px) rotateY(8deg);
  transition: transform 0.8s ease;
}
.chart-box:hover {
  transform: perspective(800px) rotateY(0deg) scale(1.02);
}
.chart-box canvas {
  display: block;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

/* For the advanced heatmap container */
.heatmap-container {
  position: relative;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  max-width: 100%;
  min-height: 500px; /* Ensure minimum height for the container */
}
/* Example snippet for risk display styling */
.risk-display {
  margin-top: 1rem;
  padding: 1rem;
  border: 2px solid #000;
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.2);
}
.risk-description {
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.risk-controls {
  margin-bottom: 2rem;
}

.risk-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.risk-button {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.risk-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.risk-button .factor-name {
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.risk-button .factor-desc {
  font-size: 0.9rem;
  opacity: 0.8;
}

.risk-legend {
  margin: 2rem 0;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.legend-title {
  font-weight: 900;
  margin-bottom: 1rem;
}

.legend-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.color-box {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid rgba(0, 0, 0, 0.2);
}

.color-box.low { background: rgba(0, 255, 0, 0.85); }
.color-box.medium { background: rgba(255, 255, 0, 0.85); }
.color-box.high { background: rgba(255, 165, 0, 0.85); }
.color-box.critical { background: rgba(255, 0, 0, 0.85); }

.heatmap-wrapper {
  height: 500px;
  margin: 2rem 0;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.data-source {
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.data-source ul {
  list-style-type: none;
  padding-left: 1.5rem;
  margin-top: 0.5rem;
}

.data-source ul li {
  position: relative;
  padding: 0.3rem 0;
}

.data-source ul li::before {
  content: "•";
  position: absolute;
  left: -1.5rem;
  color: #f06b6b;
  font-weight: bold;
}

#trueHeatmap {
  max-height: 400px !important; /* Control maximum height of the canvas */
  width: 100% !important;
  margin: 20px auto;
}

#heatmap-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
  justify-content: center;
}

.risk-button {
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  background: rgba(12, 127, 161, 0.1);
  color: #000000;
  cursor: pointer;
  position: relative;
  transition: background 0.3s ease;
}

.risk-button:hover {
  background: rgba(73, 213, 255, 0.486);
}

.chart-box {
  position: relative;
  width: 100%;
  padding: 20px;
  margin-bottom: 30px;
}

.risk-legend {
  margin-top: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.legend-title {
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: #000;
}

.legend-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.level-info {
  display: flex;
  flex-direction: column;
}

.level-title {
  font-weight: 900;
  color: #000;
}

.level-desc {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* ===== FADE-IN SCROLL ANIMATION ===== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}
.fade-in.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  .main-container {
    padding: 5px 10px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: auto;
  }
  /* Responsive adjustments */
@media (max-width: 768px) {
  .heatmap-container {
      min-height: 400px;
  }
  
  #trueHeatmap {
      max-height: 300px !important;
  }
  
  .risk-button {
      font-size: 14px;
      padding: 6px 12px;
  }
}
  .glass-box {
    width: 100%;
    margin: 15px 0;
  }
  .page-title {
    font-size: 1.6rem;
    margin-bottom: 10px;
  }
  .chart-box {
    transform: none;
    margin: 10px 0;
  }
  .chart-box:hover {
    transform: none;
  }
  .chart-box canvas {
    max-width: 100%;
    height: auto;
  }
  .heatmap-container {
    height: 400px;
  }
  .site-footer {
    padding: 1rem;
    font-size: 1rem;
    text-align: center;
  }
}
