/* Custom Styles for Data Agregat Kependudukan Kabupaten Kepahiang */

:root {
  --color-primary-green: #0F766E; /* Calm Emerald Teal */
  --color-primary-blue: #0E7490;  /* Calm Cyan Blue */
  --color-accent-green: #059669;
  --color-accent-blue: #0284C7;
  --color-bg-light: #F8FAFC;
  --color-card-light: #FFFFFF;
}

/* Background image handling for mountain valley di kepahiang */
.bg-mountain-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('/assets/mountain-valley.jpg');
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.5s ease;
}

/* Light mode opacity: default 25% */
html:not(.dark) .bg-mountain-backdrop {
  opacity: 0.25;
  filter: saturate(1.1) brightness(1.05);
}

/* Dark mode opacity: default 25% */
html.dark .bg-mountain-backdrop {
  opacity: 0.25;
  filter: saturate(1.2) brightness(0.9);
}

/* Glassmorphic card surfaces */
.glass-panel {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 4px 20px -2px rgba(15, 118, 110, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
}

html.dark .glass-panel {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(51, 65, 85, 0.6);
  box-shadow: 0 4px 25px -2px rgba(0, 0, 0, 0.35);
}

/* Stat card glow */
.stat-card-glow {
  position: relative;
  overflow: hidden;
}

.stat-card-glow::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0F766E, #0E7490, #38BDF8);
  opacity: 0.9;
}

/* Modern table styling */
.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.custom-table th {
  background-color: rgba(241, 245, 249, 0.85);
  font-weight: 600;
  letter-spacing: 0.025em;
  font-size: 0.75rem;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #E2E8F0;
}

html.dark .custom-table th {
  background-color: rgba(30, 41, 59, 0.85);
  border-bottom: 2px solid #334155;
  color: #94A3B8;
}

.custom-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #F1F5F9;
  font-size: 0.875rem;
}

html.dark .custom-table td {
  border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

.custom-table tbody tr {
  transition: background-color 0.15s ease;
}

.custom-table tbody tr:hover {
  background-color: rgba(240, 253, 250, 0.6);
}

html.dark .custom-table tbody tr:hover {
  background-color: rgba(19, 78, 74, 0.2);
}

/* Chart Canvas container */
.chart-container-box {
  position: relative;
  width: 100%;
  min-height: 320px;
  max-height: 420px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

/* Print view optimization */
@media print {
  .no-print {
    display: none !important;
  }
  .bg-mountain-backdrop {
    display: none !important;
  }
  body {
    background: #FFFFFF !important;
    color: #000000 !important;
  }
  .glass-panel {
    box-shadow: none !important;
    border: 1px solid #CCCCCC !important;
    background: #FFFFFF !important;
    break-inside: avoid;
  }
}
