/* ========================================================================
   1. Base / Global Styles & Resets
   ======================================================================== */

/* Hide elements until Alpine.js (or similar) has processed them */
[x-cloak], [x-cloak=""] {
  display: none !important;
}

/* Screen reader only content - visually hidden but accessible */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Force full-height layout and enable vertical scrolling */
html,
body {
  height: 100%;
  overflow-y: auto;
}

/* Global input invalid state */
input.invalid {
  border-color: #dc2626;
}

/* ========================================================================
 2. Layout Components & Basic Sizing
 ======================================================================== */

/* Audio control sizing */
.audio-control {
  width: 100%;
  height: 25px;
}

/* Audio player skeleton (before content loads) */
.audio-player-container {
  background: linear-gradient(to bottom, rgba(128, 128, 128, 0.4), rgba(128, 128, 128, 0.1));
  border-radius: 0.5rem;
}
.audio-player-container::before {
  content: "";
  width: 1px;
  margin-left: -1px;
  float: left;
  height: 0;
  padding-top: 50%; /* Maintains a 2:1 ratio */
}
.audio-player-container::after {
  content: "";
  display: table;
  clear: both;
}

/* ========================================================================
 3. Confidence & Badge Components
 ======================================================================== */

/* Container for confidence elements */
.confidence-container {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

/* Confidence badge (for example, showing a percentage) */
.confidence-badge {
  width: 40px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 0.75rem;
}

/* Review badges for correctness indicators */
.review-badge {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: bold;
  color: white;
}
.review-badge.correct {
  background-color: hsl(142, 76%, 36%);
}
.review-badge.false_positive {
  background-color: hsl(0, 74%, 42%);
}

/* Responsive badge adjustments on smaller screens */
@media (max-width: 1024px) {
  .confidence-badge {
      width: 40px;
      height: 20px;
      font-size: 0.65rem;
  }
  .review-badge {
      width: 26px;
      height: 26px;
      font-size: 0.75rem;
  }
}

/* ========================================================================
 4. Species Ball Component
 ======================================================================== */

.species-ball {
  min-width: 1rem;
  height: 1.25rem;
  display: inline-flex;
  padding: 0.2rem 0.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  font-size: 0.75rem;
  line-height: 1;
}
@media (max-width: 1024px) {
  .species-ball {
      font-size: 0.65rem;
  }
}

/* ========================================================================
 5. Table & Heatmap Styles
 ======================================================================== */

/* -- Sticky header for recent detections table -- */
thead.sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 2rem;
  background-color: var(--fallback-b1, oklch(var(--b1)/1));
}
/* Dark theme header uses a gradient */
[data-theme=dark] thead.sticky-header {
  background-image: linear-gradient(to bottom, #1d232a 50%, transparent 100%);
}

/* Table cell display settings */
.hour-header,
.hour-data,
.hourly-count {
  display: none;
}

/* Hide some count cells by default */
.bi-hourly-count,
.six-hourly-count {
  display: none;
}

/* Light theme borders for hour data cells */
[data-theme=light] .hour-data:not(.heatmap-color-0) {
  position: relative;
  z-index: 1;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-clip: padding-box;
  border-collapse: collapse;
}

/* Flex alignment for links inside hour cells */
.hour-data a {
  height: 2rem;
  min-height: 2rem;
  max-height: 2rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Remove extra borders in specific table rows */
.table :where(thead tr, tbody tr:not(:last-child), tbody tr:first-child:last-child) {
  border-bottom-width: 0;
}
.table :where(thead td, thead th) {
  border-bottom: 1px solid var(--fallback-b2, oklch(var(--b2)/var(--tw-border-opacity)));
}

/* Responsive table adjustments */
/* 
 * Note on CSS selectors: We use attribute selectors [class*="hidden"][class*="2xl:table-cell"]
 * instead of direct class selectors (.hidden.2xl\:table-cell) for better cross-browser compatibility
 * when dealing with class names that contain special characters like colons and numbers.
 */

/* Extra large screens (large desktops, ≥1400px): show hourly view and total detections */
@media (min-width: 1400px) {
  .hour-header.hourly-count,
  .hour-data.hourly-count,
  .hourly-count {
    display: table-cell;
  }
  /* Show total detections column on extra large screens only */
  /* Use attribute selector for better cross-browser compatibility */
  [class*="hidden"][class*="2xl:table-cell"] {
    display: table-cell;
  }
}

/* Large screens (desktops, 1200px-1399px): show hourly view, hide total detections */
@media (min-width: 1200px) and (max-width: 1399px) {
  .hour-header.hourly-count,
  .hour-data.hourly-count,
  .hourly-count {
    display: table-cell;
  }
  /* Hide total detections on large screens */
  /* Use attribute selector for better cross-browser compatibility */
  [class*="hidden"][class*="2xl:table-cell"] {
    display: none !important;
  }
}

/* Medium-large screens (small desktops and large tablets, 1024px-1199px): show hourly view, hide total detections */
@media (min-width: 1024px) and (max-width: 1199px) {
  .hour-header.hourly-count,
  .hour-data.hourly-count,
  .hourly-count {
    display: table-cell;
  }
  /* Reduce padding for hourly cells on medium-large screens */
  .hour-header.hourly-count,
  .hour-data.hourly-count {
    padding-left: 0;
    padding-right: 0;
    font-size: 0.7rem;
  }
  /* Hide total detections on medium-large screens */
  /* Use attribute selector for better cross-browser compatibility */
  [class*="hidden"][class*="2xl:table-cell"] {
    display: none !important;
  }
  /* Make species column more compact */
  th[scope="row"].py-1.px-2.sm\:px-4.font-medium {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  th[scope="row"].py-1.px-2.sm\:px-4.font-medium a {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }
  /* Make thumbnail column more compact */
  th[scope="row"].py-1.px-2 .thumbnail-container {
    max-width: 40px;
  }
  th[scope="row"].py-1.px-2 .thumbnail-container img {
    max-width: 40px;
    height: auto;
  }
}

/* Medium screens (tablets, 768px-1023px): show bi-hourly, hide total detections */
@media (min-width: 768px) and (max-width: 1023px) {
  .hour-header.bi-hourly,
  .hour-data.bi-hourly,
  .bi-hourly-count {
    display: table-cell;
  }
  /* Hide hourly counts on medium screens */
  .hour-header.hourly-count,
  .hour-data.hourly-count,
  .hourly-count {
    display: none;
  }
  /* Hide total detections on medium screens */
  /* Use attribute selector for better cross-browser compatibility */
  [class*="hidden"][class*="2xl:table-cell"] {
    display: none !important;
  }
  /* Reduce padding for bi-hourly cells on medium screens */
  .hour-header.bi-hourly,
  .hour-data.bi-hourly {
    padding-left: 0;
    padding-right: 0;
    font-size: 0.7rem;
  }
  /* Ensure species column is not too wide */
  th[scope="row"].py-1.px-2.sm\:px-4.font-medium {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  th[scope="row"].py-1.px-2.sm\:px-4.font-medium a {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
  }
  /* Make thumbnail column more compact */
  th[scope="row"].py-1.px-2 .thumbnail-container {
    max-width: 35px;
  }
  th[scope="row"].py-1.px-2 .thumbnail-container img {
    max-width: 35px;
    height: auto;
  }
}

/* Small screens (mobile, <768px): show bi-hourly */
@media (max-width: 767px) {
  .hour-header.bi-hourly,
  .hour-data.bi-hourly,
  .bi-hourly-count {
    display: table-cell;
  }
  /* Hide total detections on small screens */
  /* Use attribute selector for better cross-browser compatibility */
  [class*="hidden"][class*="2xl:table-cell"] {
    display: none !important;
  }
  /* Reduce padding for bi-hourly cells on small screens */
  .hour-header.bi-hourly,
  .hour-data.bi-hourly {
    padding-left: 0;
    padding-right: 0;
  }
}

/* Extra small screens (small mobile, <480px): show six-hourly */
@media (max-width: 479px) {
  .hour-header.bi-hourly,
  .hour-data.bi-hourly,
  .bi-hourly-count {
    display: none;
  }
  .hour-header.six-hourly,
  .hour-data.six-hourly,
  .six-hourly-count {
    display: table-cell;
  }
}

/* Consistent table cell sizing */
.hour-data {
  height: 2rem;
  min-height: 2rem;
  max-height: 2rem;
  line-height: 2rem;
  box-sizing: border-box;
  vertical-align: middle;
}
.table tr {
  height: 2rem;
  min-height: 2rem;
  max-height: 2rem;
}
.table td,
.table th {
  box-sizing: border-box;
  height: 2rem;
  min-height: 2rem;
  max-height: 2rem;
  vertical-align: middle;
}

/* Make hour cells more compact by default */
.hour-header,
.hour-data {
  padding-left: 0.1rem;
  padding-right: 0.1rem;
}

/* Sunrise/sunset icon positioning */
.hour-header a {
  position: relative;
  display: inline-block;
  padding: 0.25rem 0.25rem;
  min-width: 1.5rem;
}
.hour-header a span {
  position: absolute;
  top: -1rem;
  left: 50%;
  transform: translateX(-50%);
  line-height: 1;
}

/* Responsive hour header adjustments */
@media (min-width: 1200px) and (max-width: 1399px) {
  .hour-header a {
    padding: 0.2rem 0.2rem;
    min-width: 1.4rem;
    font-size: 0.75rem;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .hour-header a {
    padding: 0.2rem 0.2rem;
    min-width: 1.4rem;
    font-size: 0.75rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hour-header a {
    padding: 0.15rem 0.15rem;
    min-width: 1.3rem;
    font-size: 0.7rem;
  }
}

@media (max-width: 767px) {
  .hour-header a {
    padding: 0.1rem 0.1rem;
    min-width: 1.2rem;
    font-size: 0.65rem;
  }
}

/* ========================================================================
 6. Typography & Focus States
 ======================================================================== */

/* Extra small text */
.text-2xs {
  font-size: 0.6rem;
}

/* Focus styles for inputs and selects */
.input:focus-visible,
.select:focus-visible {
  outline: 1px solid transparent;
  outline-offset: 0;
  box-shadow: 0 0 0 2px rgba(164, 202, 254, 0.45);
}

/* ========================================================================
 7. Thumbnails & Tooltips
 ======================================================================== */

.thumbnail-container {
  position: relative;
  display: inline-block;
}
.thumbnail-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 10;
}
.thumbnail-container:hover .thumbnail-tooltip {
  display: block;
}

/* Generic tooltip styling */
.tooltip {
  position: absolute;
  left: 0;
  bottom: 100%;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
              0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 50;
  background-color: var(--surface-200);
  border: 1px solid var(--border-100);
  max-width: 36rem;
  white-space: normal;
}
/* Allow tooltips to escape container overflow */
.form-control.relative {
  overflow: visible;
}
.collapse-content {
  overflow: visible !important;
}

/* ========================================================================
 8. Circular Progress & Confidence Circle
 ======================================================================== */

/* Base circle container for confidence display */
.confidence-circle {
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--lighter-color, #f3f4f6);
}
/* Dark theme adjustment */
[data-theme="dark"] .confidence-circle {
  background: var(--darker-color, rgb(17, 24, 39));
}

/* Inner track to create a ring effect */
.confidence-circle-track {
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  background: var(--lighter-color, #f3f4f6);
  border-radius: 50%;
  z-index: 2;
}
[data-theme="dark"] .confidence-circle-track {
  background: var(--darker-color, rgb(17, 24, 39));
}

/* Progress arc (ring) */
.confidence-circle-progress {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform-origin: center;
  transform: rotate(180deg); /* Shifts starting point from 12 to 6 o'clock */
  background: conic-gradient(currentColor var(--progress), transparent 0);
  transition: all 0.3s ease;
  z-index: 1;
}

/* Confidence level color schemes */
/* High Confidence (70–100%) */
.confidence-high {
  color: #059669;
  --lighter-color: #ecfdf5;
  --darker-color: rgba(6, 78, 59, 0.2);
}
/* Medium Confidence (40–69%) */
.confidence-medium {
  color: #d97706;
  --lighter-color: #fffbeb;
  --darker-color: rgba(120, 53, 15, 0.2);
}
/* Low Confidence (0–39%) */
.confidence-low {
  color: #dc2626;
  --lighter-color: #fef2f2;
  --darker-color: rgba(127, 29, 29, 0.2);
}

/* Text inside the confidence circle */
.confidence-circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  font-weight: 600;
  color: currentColor;
  z-index: 3;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.confidence-circle-text svg {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}

/* Dark theme adjustments for confidence colors */
[data-theme="dark"] .confidence-high {
  color: #34d399;
  --darker-color: rgb(6, 78, 59);
}
[data-theme="dark"] .confidence-medium {
  color: #fbbf24;
  --darker-color: rgb(120, 53, 15);
}
[data-theme="dark"] .confidence-low {
  color: #f87171;
  --darker-color: rgb(127, 29, 29);
}

/* Minimum height for progress bars */
.progress {
  min-height: 14px;
}

/* ========================================================================
 9. Heatmap Styles (Light & Dark Themes)
 ======================================================================== */

/* -- Light theme heatmap colors (default) -- */
:root {
  --heatmap-color-0: #f0f9fc;
  --heatmap-color-1: #e0f3f8;
  --heatmap-color-2: #ccebf6;
  --heatmap-color-3: #99d7ed;
  --heatmap-color-4: #66c2e4;
  --heatmap-color-5: #33ade1;
  --heatmap-color-6: #0099d8;
  --heatmap-color-7: #0077be;
  --heatmap-color-8: #005595;
  --heatmap-color-9: #003366;
}
/* -- Dark theme heatmap colors -- */
[data-theme=dark] {
  --heatmap-color-0: #001a20;
  --heatmap-color-1: #002933;
  --heatmap-color-2: #004466;
  --heatmap-color-3: #005c80;
  --heatmap-color-4: #007399;
  --heatmap-color-5: #008bb3;
  --heatmap-color-6: #33a3cc;
  --heatmap-color-7: #66b8e2;
  --heatmap-color-8: #99cde9;
  --heatmap-color-9: #cce3f1;
}
/* Dark theme heatmap text colors */
[data-theme=dark] {
  --heatmap-text-1: #fff;
  --heatmap-text-2: #fff;
  --heatmap-text-3: #fff;
  --heatmap-text-4: #fff;
  --heatmap-text-5: #fff;
  --heatmap-text-6: #000;
  --heatmap-text-7: #000;
  --heatmap-text-8: #000;
  --heatmap-text-9: #000;
}

/* Light theme heatmap cell styles */
[data-theme=light] .heatmap-color-1 {
  background: linear-gradient(-45deg, var(--heatmap-color-1) 45%, var(--heatmap-color-0) 95%);
  color: var(--heatmap-text-1, #000);
}
[data-theme=light] .heatmap-color-2 {
  background: linear-gradient(-45deg, var(--heatmap-color-2) 45%, var(--heatmap-color-1) 95%);
  color: var(--heatmap-text-2, #000);
}
[data-theme=light] .heatmap-color-3 {
  background: linear-gradient(-45deg, var(--heatmap-color-3) 45%, var(--heatmap-color-2) 95%);
  color: var(--heatmap-text-3, #000);
}
[data-theme=light] .heatmap-color-4 {
  background: linear-gradient(-45deg, var(--heatmap-color-4) 45%, var(--heatmap-color-3) 95%);
  color: var(--heatmap-text-4, #000);
}
[data-theme=light] .heatmap-color-5 {
  background: linear-gradient(-45deg, var(--heatmap-color-5) 45%, var(--heatmap-color-4) 95%);
  color: var(--heatmap-text-5, #fff);
}
[data-theme=light] .heatmap-color-6 {
  background: linear-gradient(-45deg, var(--heatmap-color-6) 45%, var(--heatmap-color-5) 95%);
  color: var(--heatmap-text-6, #fff);
}
[data-theme=light] .heatmap-color-7 {
  background: linear-gradient(-45deg, var(--heatmap-color-7) 45%, var(--heatmap-color-6) 95%);
  color: var(--heatmap-text-7, #fff);
}
[data-theme=light] .heatmap-color-8 {
  background: linear-gradient(-45deg, var(--heatmap-color-8) 45%, var(--heatmap-color-7) 95%);
  color: var(--heatmap-text-8, #fff);
}
[data-theme=light] .heatmap-color-9 {
  background: linear-gradient(-45deg, var(--heatmap-color-9) 45%, var(--heatmap-color-8) 95%);
  color: var(--heatmap-text-9, #fff);
}

/* Dark theme heatmap cell styles */
[data-theme=dark] .heatmap-color-1 {
  background: linear-gradient(135deg, var(--heatmap-color-1) 45%, var(--heatmap-color-0) 95%);
  color: var(--heatmap-text-1, #000);
}
[data-theme=dark] .heatmap-color-2 {
  background: linear-gradient(135deg, var(--heatmap-color-2) 45%, var(--heatmap-color-1) 95%);
  color: var(--heatmap-text-2, #000);
}
[data-theme=dark] .heatmap-color-3 {
  background: linear-gradient(135deg, var(--heatmap-color-3) 45%, var(--heatmap-color-2) 95%);
  color: var(--heatmap-text-3, #000);
}
[data-theme=dark] .heatmap-color-4 {
  background: linear-gradient(135deg, var(--heatmap-color-4) 66%, var(--heatmap-color-3) 110%);
  color: var(--heatmap-text-4, #000);
}
[data-theme=dark] .heatmap-color-5 {
  background: linear-gradient(135deg, var(--heatmap-color-5) 66%, var(--heatmap-color-4) 110%);
  color: var(--heatmap-text-5, #fff);
}
[data-theme=dark] .heatmap-color-6 {
  background: linear-gradient(135deg, var(--heatmap-color-6) 66%, var(--heatmap-color-5) 110%);
  color: var(--heatmap-text-6, #fff);
}
[data-theme=dark] .heatmap-color-7 {
  background: linear-gradient(135deg, var(--heatmap-color-7) 66%, var(--heatmap-color-6) 110%);
  color: var(--heatmap-text-7, #fff);
}
[data-theme=dark] .heatmap-color-8 {
  background: linear-gradient(135deg, var(--heatmap-color-8) 66%, var(--heatmap-color-7) 110%);
  color: var(--heatmap-text-8, #fff);
}
[data-theme=dark] .heatmap-color-9 {
  background: linear-gradient(135deg, var(--heatmap-color-9) 66%, var(--heatmap-color-8) 110%);
  color: var(--heatmap-text-9, #fff);
}

/* ========================================================================
 10. Settings Page & Form Styles
 ======================================================================== */

/* Settings list item styling */
.settings-list-item {
  background-color: var(--surface-300);
  border: 1px solid var(--border-100);
  border-radius: 0.375rem;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.settings-list-item:hover {
  background-color: var(--surface-400);
}

/* Settings section headers and descriptions */
.settings-section-header {
  font-size: 1.25rem;
  font-weight: 500;
}
.settings-section-description {
  font-size: 0.875rem;
  color: rgb(107, 114, 128);
}

/* Changed badge in settings */
.settings-changed-badge {
  margin-left: 0.5rem;
}
.settings-changed-badge span.badge {
  display: flex;
  align-items: center;
  justify-content: center;
}
.settings-changed-badge span.badge span {
  font-size: 0.75rem;
  margin-bottom: 0.125rem;
}

/* Form groups for settings */
.settings-form-group {
  position: relative;
  margin-top: 1rem;
}
.settings-form-group label {
  display: block;
  font-size: 0.875rem;
}

/* Help icon styling */
.help-icon {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  color: rgb(107, 114, 128);
  cursor: help;
}

/* Input groups (e.g., text input + button) */
.settings-input-group {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
}
.settings-input-group input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 2rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-size: 0.875rem;
  line-height: 2rem;
  border-radius: var(--rounded-btn, 0.5rem);
  border: 1px solid var(--fallback-bc, oklch(var(--bc)/0.2));
  background-color: var(--fallback-b1, oklch(var(--b1)/var(--tw-bg-opacity)));
}
.settings-input-group input[type="text"]:focus-visible {
  outline: 1px solid transparent;
  outline-offset: 0;
  box-shadow: 0 0 0 2px rgba(164, 202, 254, 0.45);
}
.settings-input-group button {
  flex-shrink: 0;
  width: 5rem;
  height: 2rem;
  min-height: 2rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  border-radius: var(--rounded-btn, 0.5rem);
  background-color: var(--fallback-p, oklch(var(--p)/1));
  color: var(--fallback-pc, oklch(var(--pc)/1));
  border: none;
  cursor: pointer;
}
.settings-input-group button:hover {
  background-color: color-mix(in oklab, var(--fallback-p, oklch(var(--p)/1)) 90%, black);
}

/* Modal sections within settings */
.settings-modal-section {
  margin-bottom: 1rem;
}
.settings-modal-section label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
}
.settings-modal-section input,
.settings-modal-section select {
  width: 100%;
  margin-top: 0.25rem;
}
.settings-modal-section .help-text {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ========================================================================
 11. Miscellaneous / Utility Styles
 ======================================================================== */

/* Base input and select border radius */
.input {
  border-radius: 0.3rem;
}
.select {
  border-radius: 0.3rem;
}

/* Card Padding - Consistent across all pages */
.card-padding {
  padding: 1rem;
  margin: 0.5rem;
}

/* Progress width classes (0-100) */
/* We'll generate a few key percentages that are commonly used */
.progress-width-0 { width: 0%; }
.progress-width-5 { width: 5%; }
.progress-width-10 { width: 10%; }
.progress-width-15 { width: 15%; }
.progress-width-20 { width: 20%; }
.progress-width-25 { width: 25%; }
.progress-width-30 { width: 30%; }
.progress-width-35 { width: 35%; }
.progress-width-40 { width: 40%; }
.progress-width-45 { width: 45%; }
.progress-width-50 { width: 50%; }
.progress-width-55 { width: 55%; }
.progress-width-60 { width: 60%; }
.progress-width-65 { width: 65%; }
.progress-width-70 { width: 70%; }
.progress-width-75 { width: 75%; }
.progress-width-80 { width: 80%; }
.progress-width-85 { width: 85%; }
.progress-width-90 { width: 90%; }
.progress-width-95 { width: 95%; }
.progress-width-100 { width: 100%; }

/* Small changed badge styling */
.badge.badge-primary.badge-sm.changed-badge {
  opacity: 1;
  transition: opacity 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
  height: 1rem;
}

/* Theme toggle icon rotation */
.swap-rotate {
  transition: transform 0.2s ease-in-out;
}

/* Date input icon color-scheme per theme */
[data-theme="light"] input[type="date"] {
  color-scheme: light;
}
[data-theme="dark"] input[type="date"] {
  color-scheme: dark;
}

/* ========================================================================
 12. Notification Bell Animation
 ======================================================================== */

/* Wiggle animation for notification bell */
@keyframes wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(-15deg); }
  50% { transform: rotate(15deg); }
  75% { transform: rotate(-10deg); }
  100% { transform: rotate(0deg); }
}

/* Swing from the top like a real bell */
.animate-wiggle {
  transform-origin: top center;
  animation: wiggle 0.5s ease-in-out 2;
}

/* ========================================================================
 13. Status Badges
 ======================================================================== */

/* Base status badge style */
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid;
}
.status-badge.unverified {
  color: #6b7280;
  border-color: #6b7280;
  background-color: #f3f4f6;
}
.status-badge.correct {
  color: #059669;
  border-color: #059669;
  background-color: #ecfdf5;
}
.status-badge.false {
  color: #dc2626;
  border-color: #dc2626;
  background-color: #fef2f2;
}
.status-badge.locked {
  color: #d97706;
  border-color: #d97706;
  background-color: #fffbeb;
}
.status-badge.comment {
  color: #2563eb;
  border-color: #2563eb;
  background-color: #eff6ff;
}

/* Dark theme status badges */
[data-theme="dark"] .status-badge.unverified {
  color: #9ca3af;
  border-color: #9ca3af;
  background-color: rgba(156, 163, 175, 0.1);
}
[data-theme="dark"] .status-badge.correct {
  color: #34d399;
  border-color: #34d399;
  background-color: rgba(52, 211, 153, 0.1);
}
[data-theme="dark"] .status-badge.false {
  color: #f87171;
  border-color: #f87171;
  background-color: rgba(248, 113, 113, 0.1);
}
[data-theme="dark"] .status-badge.locked {
  color: #fbbf24;
  border-color: #fbbf24;
  background-color: rgba(251, 191, 36, 0.1);
}
[data-theme="dark"] .status-badge.comment {
  color: #60a5fa;
  border-color: #60a5fa;
  background-color: rgba(96, 165, 250, 0.1);
}

/* Additional dark theme table row highlighting and border colors */
[data-theme="dark"] .hover\:bg-gray-50:hover {
  background-color: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .divide-gray-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .border-gray-200 {
  border-color: rgba(255, 255, 255, 0.1);
}


