:root {
  --color-alveus-green: oklch(51.5088% 0.0176761 136.149);
  --color-alveus-green-50: oklch(93.7975% 0.00340861 145.55);
  --color-alveus-green-100: oklch(90.7353% 0.00456083 134.851);
  --color-alveus-green-200: oklch(84.6576% 0.00927865 134.882);
  --color-alveus-green-300: oklch(78.2914% 0.0112161 136.569);
  --color-alveus-green-400: oklch(72.0086% 0.0150529 138.717);
  --color-alveus-green-500: oklch(65.421% 0.0179408 133.888);
  --color-alveus-green-600: oklch(58.6117% 0.0203054 135.002);
  --color-alveus-green-700: oklch(51.5088% 0.0176761 136.149);
  --color-alveus-green-800: oklch(41.2997% 0.0145722 133.532);
  --color-alveus-green-900: oklch(30.0747% 0.00823595 137.81);
  --color-alveus-tan: oklch(95.6361% 0.0168614 56.1905);
  --color-white: oklch(100% 0 0);
  --color-gray-50: oklch(98.4825% 0.00131907 106.427);
  --color-gray-100: oklch(96.9871% 0.00132404 106.427);
  --color-gray-200: oklch(92.3175% 0.0025628 48.7165);
  --color-gray-300: oklch(86.8661% 0.00430627 56.3638);
  --color-gray-600: oklch(44.4417% 0.00959722 73.639);
  --color-gray-700: oklch(37.4116% 0.0086783 67.5584);
}

body {
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background-color: var(--color-alveus-tan);
  color: var(--color-alveus-green-800);
  margin: 0;
  padding: 1rem;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 2rem;
  color: var(--color-alveus-green-700);
}

.info-banner {
  background: linear-gradient(
    135deg,
    var(--color-alveus-green-700) 0%,
    var(--color-alveus-green-600) 100%
  );
  color: var(--color-white);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  text-align: left;
}

.info-banner h2 {
  margin: 0 0 0.5rem 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-white);
  text-align: left;
}

.info-banner h3 {
  margin: 2rem 0 1rem 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-alveus-green-100);
  border-left: 4px solid var(--color-alveus-green-100);
  padding-left: 1rem;
  text-align: left;
}

.info-banner h3:first-of-type {
  margin-top: 1.5rem;
}

.info-banner .lead {
  font-size: 1.1rem;
  font-weight: 500;
  text-align: left;
  margin: 0 0 2rem 0;
  color: var(--color-alveus-green-100);
  font-style: italic;
}

.info-banner p {
  margin: 0 0 1rem 0;
  line-height: 1.7;
  font-size: 0.95rem;
  text-align: left;
}

.info-banner p:last-of-type {
  margin-bottom: 1.5rem;
}

.info-banner .links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1.5rem;
  margin-top: 1rem;
}

.info-banner .links a {
  color: var(--color-white) !important;
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none !important;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  text-align: center;
}

.info-banner .links a:hover {
  color: var(--color-alveus-green-700) !important;
  background: var(--color-white);
  border-color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .info-banner .links {
    flex-direction: column;
    align-items: center;
  }

  .info-banner .links a {
    width: 100%;
    max-width: 250px;
  }
}

.summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--color-alveus-green);
  color: var(--color-white);
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.summary-item {
  flex: 1 1 45%;
}

.summary-item.total {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-white);
}

.summary-item h2 {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--color-white);
}

.panels {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.bg-alveus-green {
  background-color: var(--color-alveus-green);
}

.panel {
  flex: 1 1 48%;
  background-color: var(--color-alveus-green);
  color: var(--color-white);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  padding: 1rem;
  max-height: 600px;
  display: flex;
  flex-direction: column;
}

.panel.wide {
  flex: 1 1 100%;
}

/* Mobile responsiveness for panels */
@media (max-width: 768px) {
  .panel {
    flex: 1 1 100%;
    max-height: none;
  }

  .panels {
    flex-direction: column;
  }

  table {
    font-size: 0.75rem;
  }

  th,
  td {
    padding: 0.3rem 0.2rem;
  }
}

.panel h2 {
  margin-top: 0;
  color: var(--color-white);
}

.search {
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--color-alveus-green-200);
  border-radius: 6px;
  font-size: 0.9rem;
  background: var(--color-white);
  color: var(--color-alveus-green-800);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search:focus {
  outline: none;
  border-color: var(--color-alveus-green-100);
  box-shadow: 0 0 6px var(--color-alveus-green-100);
}

.search::placeholder {
  color: var(--color-alveus-green-400);
}

.table-wrapper {
  overflow-y: auto;
  flex: 1;
  border-radius: 8px;
  background: var(--color-alveus-green-800);
  border: 1px solid var(--color-alveus-green-600);
  margin-top: 0.5rem;
}

/* Custom scrollbar for green theme */
.table-wrapper::-webkit-scrollbar {
  width: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: var(--color-alveus-green-800);
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--color-alveus-green-600);
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--color-alveus-green-500);
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 2px;
  font-size: 0.85rem;
  color: var(--color-white);
}

th,
td {
  padding: 0.45rem 0.4rem;
  text-align: center;
  border: none;
  border-radius: 4px;
}

th {
  position: sticky;
  top: 0;
  background: var(--color-alveus-green-800);
  color: var(--color-white);
  font-weight: 600;
  z-index: 2;
  border: 1px solid var(--color-alveus-green-700);
}

tr:nth-child(even) td {
  background-color: var(--color-alveus-green-600);
}

tr:nth-child(odd) td {
  background-color: var(--color-alveus-green-700);
}

tr:hover td:not(.heatmap-cell):not(.date-section-header td) {
  background: var(--color-alveus-green-500) !important;
  transform: scale(1.02);
  transition: all 0.2s ease;
}

td.count {
  text-align: right;
  font-weight: 600;
  color: var(--color-alveus-green-100);
}

.date-cell {
  width: 40%;
}

.count-cell {
  width: 20%;
  text-align: center;
}

.pixels-cell {
  width: 20%;
  text-align: center;
}

.dollars-cell {
  width: 20%;
  text-align: right;
}

.date-section-header .date-section-cell {
  background-color: var(--color-alveus-green-800) !important;
  position: sticky;
  top: 2rem;
}

/* Heatmap styling for green theme */
.heatmap-cell {
  text-align: center;
  border-radius: 6px;
  font-weight: 600;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow: 0 0 2px rgba(255, 255, 255, 0.2);
  border: 1px solid var(--color-alveus-green-800);
}

.heatmap-cell:hover {
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  z-index: 3;
  outline: 2px solid var(--color-white);
  outline-offset: 2px;
}

.heatmap-header th {
  background: var(--color-alveus-green-900) !important;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-white);
  border: 1px solid var(--color-alveus-green-800);
}

.image-container {
  position: relative;
  width: 100%;
  margin: 1rem 0;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.image-container img {
  display: block;
  width: 100%;
  height: 100%;
}

#pixelOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.pixel-dot {
  background-color: transparent;
  border: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.pixel-dot:hover {
  background-color: rgba(255, 255, 0, 0.3);
  border: solid yellow 1px;
  box-sizing: border-box;
}

.pixel-dot.filtered {
  background-color: rgba(112, 128, 144, 0.7) !important;
}

/* Pixel highlighting states */
.pixel-dot.dimmed {
  background-color: rgba(0, 0, 0, 0.1) !important;
}

.pixel-dot.highlighted {
  background-color: rgba(255, 215, 0, 0.8) !important;
  border: 2px solid #ffd700 !important;
  z-index: 5;
}

.pixel-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 2px 6px;
  font-size: 0.75rem;
  border-radius: 4px;
  pointer-events: none;
  white-space: nowrap;
  z-index: 10;
  display: none;
}

.pixel-search-container {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
}

.pixel-search-field {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  border: 2px solid var(--color-alveus-green-200);
  border-radius: 1rem;
  background: var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  outline: none;
}

.pixel-search-field:focus {
  border-color: var(--color-alveus-green-500);
  box-shadow: 0 4px 16px var(--color-alveus-green-200);
  transform: translateY(-1px);
}

.pixel-search-field::placeholder {
  color: var(--color-alveus-green-400);
  font-style: italic;
}

.donations-container {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}

.donations-section {
  flex: 1;
}

.donations-section h2 {
  margin-top: 0;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--color-white);
  text-align: center;
}

.donations-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  align-items: center;
}

/* Pyramid rows */
.pyramid-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  width: 100%;
}

.donation-card {
  background: var(--color-white);
  border: 1px solid var(--color-alveus-green-200);
  border-radius: 8px;
  padding: 0.5rem;
  position: relative;
  transition: all 0.2s ease;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 0.4rem;
  align-items: start;
  cursor: pointer;
  min-width: 140px;
  width: fit-content;
  flex-shrink: 0;
}

.donation-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-alveus-green-400);
}

.donor-info {
  grid-column: 1;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.donation-number {
  font-size: 0.7rem;
  color: var(--color-alveus-green-500);
  font-weight: 700;
  margin-bottom: 0.2rem;
  text-align: left;
}

.donor-name {
  font-weight: 700;
  color: var(--color-alveus-green-700);
  font-size: 0.85rem;
  margin-bottom: 0.2rem;
  line-height: 1.2;
  white-space: nowrap;
  text-align: left;
}

.amount-info {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

.donation-amount {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-alveus-green-600);
  text-align: right;
  margin-bottom: 0.1rem;
}

.pixel-count {
  font-size: 0.7rem;
  color: var(--color-alveus-green-400);
  text-align: right;
}

/* Pixel twinkling animations */
@keyframes pixelTwinkle {
  0% {
    opacity: 0;
    box-shadow: 0 0 0 rgba(255, 215, 0, 0);
  }
  100% {
    opacity: 1;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  }
}

@keyframes pixelBloom {
  0% {
    opacity: 0.8;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
  }
  20% {
    opacity: 0.85;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
  }
  40% {
    opacity: 0.9;
    box-shadow: 0 0 9px rgba(255, 215, 0, 0.6);
  }
  60% {
    opacity: 0.95;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.65);
  }
  80% {
    opacity: 0.9;
    box-shadow: 0 0 9px rgba(255, 215, 0, 0.6);
  }
  100% {
    opacity: 0.8;
    box-shadow: 0 0 6px rgba(255, 215, 0, 0.4);
  }
}

.pixel-dot.twinkling {
  animation: pixelTwinkle 0.6s ease-out forwards;
}

.pixel-dot.blooming {
  animation: pixelBloom 3s linear infinite;
}

/* Responsive adjustments for donations grid */
@media (max-width: 1200px) {
  .donations-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Adjust pyramid for smaller screens - 4 column layout */
  .donation-card:nth-child(1) {
    grid-column: 2 / 4;
  }

  .donation-card:nth-child(2) {
    grid-column: 1 / 2;
  }

  .donation-card:nth-child(3) {
    grid-column: 4 / 5;
  }

  .donation-card:nth-child(4),
  .donation-card:nth-child(5),
  .donation-card:nth-child(6),
  .donation-card:nth-child(7) {
    grid-column: auto;
  }

  .donation-card:nth-child(8) {
    grid-column: 1 / 2;
  }

  .donation-card:nth-child(9) {
    grid-column: 2 / 3;
  }

  .donation-card:nth-child(10) {
    grid-column: 4 / 5;
  }
}

@media (max-width: 1024px) {
  .donations-container {
    flex-direction: column;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .pyramid-row {
    gap: 0.5rem;
  }

  .donation-card {
    padding: 0.5rem;
  }

  .donor-name {
    font-size: 0.9rem;
  }

  .donation-amount {
    font-size: 1rem;
  }
}

.footer {
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
  color: var(--color-alveus-green-600);
  font-size: 0.9rem;
}

.footer p {
  margin: 0 0 0.5rem 0;
}

.footer p:last-child {
  margin-bottom: 0;
}

.footer strong {
  color: var(--color-alveus-green-700);
}

.footer a {
  color: var(--color-alveus-green-700);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: var(--color-alveus-green-600);
  text-decoration: underline;
}
