/* Custom styling for solution boxes */
.solution-box {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
  background-color: #f8f9fa;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: box-shadow 0.15s ease-in-out;
}

.solution-box:hover {
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.solution-box summary {
  font-weight: 600;
  cursor: pointer;
  padding: 1rem;
  margin: 0;
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
  border-radius: 0.5rem;
  border: none;
  outline: none;
  position: relative;
  user-select: none;
}

.solution-box summary:hover {
  background: linear-gradient(135deg, #d1ecf1 0%, #e2f3f5 100%);
}

.solution-box summary::marker {
  display: none;
}

.solution-box summary::before {
  content: "▶";
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  color: #6c757d;
}

.solution-box[open] summary::before {
  transform: translateY(-50%) rotate(90deg);
}

.solution-box[open] summary {
  border-radius: 0.5rem 0.5rem 0 0;
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 0;
}

.solution-box .content {
  padding: 1rem;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .solution-box {
    background-color: #2d3748;
    border-color: #4a5568;
  }
  
  .solution-box summary {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: #e2e8f0;
  }
  
  .solution-box summary:hover {
    background: linear-gradient(135deg, #5a6c7d 0%, #3d4852 100%);
  }
}

/* Custom styling for details elements to look like panel-tabsets */

details {
  border: none;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
  background-color: transparent;
  box-shadow: none;
  transition: all 0.2s ease;
}

details[open] {
  border: 1px solid;
  border-color: var(--bs-border-color, currentColor);
  background-color: var(--bs-body-bg, transparent);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

details summary {
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

details summary:hover {
  opacity: 0.7;
}

details summary::marker {
  font-size: 1.1em;
}

details summary::-webkit-details-marker {
  font-size: 1.1em;
}

/* Smooth rectangle button styling */
.btn {
  border-radius: 6px !important;
  transition: all 0.3s ease;
}

/* Inherit colors from current theme */
/* .btn-outline-primary {
  border-color: currentColor;
  color: currentColor;
  background-color: transparent;
} */

/* .btn-outline-primary:hover {
  background-color: transparent;
  opacity: 0.7;
} */

/* Hide the "On this page" heading */
#toc-title {
  display: none !important;
}

.sidebar-logo {
  max-width: 75% !important;
}

/* Modify the icon of the dark and light toggle */
.quarto-color-scheme-toggle {
  margin-right: 8px !important;
}

.quarto-color-scheme-toggle:not(.alternate) .bi::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%234a5568" class="bi bi-moon-stars-fill" viewBox="0 0 16 16"><path d="M6 .278a.768.768 0 0 1 .08.858 7.208 7.208 0 0 0-.878 3.46c0 4.021 3.278 7.277 7.318 7.277.527 0 1.04-.055 1.533-.16a.787.787 0 0 1 .81.316.733.733 0 0 1-.031.893A8.349 8.349 0 0 1 8.344 16C3.734 16 0 12.286 0 7.71 0 4.266 2.114 1.312 5.124.06A.752.752 0 0 1 6 .278z"/><path d="M10.794 3.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387a1.734 1.734 0 0 0-1.097 1.097l-.387 1.162a.217.217 0 0 1-.412 0l-.387-1.162A1.734 1.734 0 0 0 9.31 6.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387a1.734 1.734 0 0 0 1.097-1.097l.387-1.162zM13.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.156 1.156 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.156 1.156 0 0 0-.732-.732l-.774-.258a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732L13.863.1z"/></svg>') !important;
}

body.quarto-dark .quarto-color-scheme-toggle > .bi::before {
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23d1d5db" class="bi bi-sun-fill" viewBox="0 0 16 16"><path d="M8 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zM8 0a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 0zm0 13a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-1 0v-2A.5.5 0 0 1 8 13zm8-5a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2a.5.5 0 0 1 .5.5zM3 8a.5.5 0 0 1-.5.5h-2a.5.5 0 0 1 0-1h2A.5.5 0 0 1 3 8zm10.657-5.657a.5.5 0 0 1 0 .707l-1.414 1.414a.5.5 0 1 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm-9.193 9.193a.5.5 0 0 1 0 .707L3.05 13.657a.5.5 0 0 1-.707-.707l1.414-1.414a.5.5 0 0 1 .707 0zm9.193 2.121a.5.5 0 0 1-.707 0l-1.414-1.414a.5.5 0 0 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707zM4.464 4.465a.5.5 0 0 1-.707 0L2.343 3.05a.5.5 0 1 1 .707-.707l1.414 1.414a.5.5 0 0 1 0 .707z"/></svg>') !important;
}

/* Custom button styles with SVG icons for Jupyter and Colab */
.btn-jupyter::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 2px;
  background-image: url('jupyter_logo.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: text-bottom;
}

.btn-colab::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 1px;
  margin-bottom: -1px;
  background-image: url('colab_logo.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: text-bottom;
}


/* @media (prefers-color-scheme: dark) {
  .btn-outline-secondary {
    color: white !important;
  } */
  /* Warning and danger buttons white text in dark mode */
  /* .btn-outline-warning,
  .btn-outline-danger,
   {
    color: white !important;
  }
} */

/* Dark mode specific styling for Data button */
/* @media (prefers-color-scheme: dark) {
  .btn-outline-primary,
  .btn-outline-secondary,  
  .btn-outline-warning,
  .btn-outline-danger,
  .btn-outline-success,
  .btn-outline-info, {
    color: white !important;
  }
} */

body.quarto-dark .btn-outline-primary,
body.quarto-dark .btn-outline-secondary,
body.quarto-dark .btn-outline-warning,
body.quarto-dark .btn-outline-success,
body.quarto-dark .btn-outline-info,
body.quarto-dark .btn-outline-danger {
  color: white !important;
}

/* Ensure light mode behavior is preserved */
@media (prefers-color-scheme: light) {
  .btn-outline-secondary {
    color: var(--bs-secondary) !important;
  }
  /* Reset danger buttons to original colors in light mode */
  .btn-outline-danger {
    color: var(--bs-danger) !important;
    border-color: var(--bs-danger) !important;
  }
  /* Hover effects for buttons in light mode */
  .btn-outline-secondary:hover {
    color: white !important;
    background-color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
  }
  .btn-outline-danger:hover {
    color: white !important;
    background-color: var(--bs-danger) !important;
    border-color: var(--bs-danger) !important;
  }
}

body:not(.quarto-dark) .btn-outline-secondary {
  color: var(--bs-secondary) !important;
}

body:not(.quarto-dark) .btn-outline-danger {
  color: var(--bs-danger) !important;
  border-color: var(--bs-danger) !important;
}

/* Data button hover in light mode */
body:not(.quarto-dark) .btn-outline-secondary:hover {
  color: white !important;
  background-color: var(--bs-secondary) !important;
  border-color: var(--bs-secondary) !important;
}

/* Danger button hover in light mode */
body:not(.quarto-dark) .btn-outline-danger:hover {
  color: white !important;
  background-color: var(--bs-danger) !important;
  border-color: var(--bs-danger) !important;
}

/* Custom styling for warning elements in light mode */
@media (prefers-color-scheme: light) {
  .btn-outline-warning {
    color: #f39c12 !important;
    border-color: #f39c12 !important;
  }
  .btn-outline-warning:hover {
    color: white !important;
    background-color: #f39c12 !important;
    border-color: #f39c12 !important;
  }
  .callout-warning {
    border-color: #f39c12 !important;
  }
}

body:not(.quarto-dark) .btn-outline-warning {
  color: #f39c12 !important;
  border-color: #f39c12 !important;
}

body:not(.quarto-dark) .btn-outline-warning:hover {
  color: white !important;
  background-color: #f39c12 !important;
  border-color: #f39c12 !important;
}


body:not(.quarto-dark) .callout-warning {
  border-color: #f39c12 !important;
}

/* Ensure light mode behavior is preserved */
@media (prefers-color-scheme: light) {
  body:not(.quarto-dark) .btn-outline-secondary {
    color: var(--bs-secondary) !important;
  }

}

/* Custom styling for the Data button */
