/* Alert Block */
.sb-alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: 0.375rem;
  font-size: 1rem;
  line-height: 1.5;
  max-width: 90%;
  margin: auto;
  margin-bottom: 1rem;
}

.sb-alert-icon {
  display: inline-block;
  margin-right: 0.5rem;
}

.sb-alert-info {
  background-color: color-mix(in srgb, var(--info-color) 15%, white);
  border-color: color-mix(in srgb, var(--info-color) 25%, white);
  color: color-mix(in srgb, var(--info-color) 70%, black);
}

.sb-alert-warning {
  background-color: color-mix(in srgb, var(--warning-color) 15%, white);
  border-color: color-mix(in srgb, var(--warning-color) 25%, white);
  color: color-mix(in srgb, var(--warning-color) 70%, black);
}

.sb-alert-success {
  background-color: color-mix(in srgb, var(--success-color) 15%, white);
  border-color: color-mix(in srgb, var(--success-color) 25%, white);
  color: color-mix(in srgb, var(--success-color) 70%, black);
}

.sb-alert-danger {
  background-color: color-mix(in srgb, var(--error-color) 15%, white);
  border-color: color-mix(in srgb, var(--error-color) 25%, white);
  color: color-mix(in srgb, var(--error-color) 70%, black);
}

.sb-alert-primary {
  background-color: color-mix(in srgb, var(--primary-color) 15%, white);
  border-color: color-mix(in srgb, var(--primary-color) 25%, white);
  color: color-mix(in srgb, var(--primary-color) 70%, black);
}

.sb-alert-secondary {
  background-color: color-mix(in srgb, var(--secondary-color) 15%, white);
  border-color: color-mix(in srgb, var(--secondary-color) 25%, white);
  color: color-mix(in srgb, var(--secondary-color) 70%, black);
}

/* Card Block */
.sb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 90%;
  margin: auto;
  word-wrap: break-word;
  background-color: white;
  background-clip: border-box;
  border: 1px solid color-mix(in srgb, var(--neutral-color) 15%, transparent);
  border-radius: 0.375rem;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0.125rem 0.25rem color-mix(in srgb, black 7.5%, transparent);
}

.sb-card:hover {
  box-shadow: 0 0.5rem 1rem color-mix(in srgb, black 15%, transparent);
  transform: translateY(-2px);
}

.sb-card-header {
  padding: 0.75rem 1rem;
  margin-bottom: 0;
  background-color: color-mix(in srgb, var(--neutral-color) 3%, white);
  border-bottom: 1px solid
    color-mix(in srgb, var(--neutral-color) 15%, transparent);
}

.sb-card-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--neutral-color) 99%, black);
}

.sb-card-body {
  flex: 1 1 auto;
  padding: 1rem;
}

.sb-card-footer {
  padding: 0.75rem 1rem;
  background-color: color-mix(in srgb, var(--neutral-color) 3%, white);
  border-top: 1px solid
    color-mix(in srgb, var(--neutral-color) 33%, transparent);
}
/* Quote Block */
.sb-blockquote {
  position: relative;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
  background-color: color-mix(in srgb, var(--neutral-color) 3%, white);
  border-left: 4px solid var(--accent-color);
  border-radius: 0.375rem;
  max-width: 90%;
  margin: auto;
  margin-bottom: 1.5rem;
  box-shadow: 0 0.125rem 0.25rem color-mix(in srgb, black 5%, transparent);
  transition: all 0.2s ease-in-out;
}

.sb-blockquote:hover {
  box-shadow: 0 0.25rem 0.5rem color-mix(in srgb, black 7.5%, transparent);
  border-left-width: 6px;
}

.sb-blockquote p {
  font-style: italic;
  color: color-mix(in srgb, var(--neutral-color) 90%, black);
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.sb-blockquote footer {
  font-size: 0.875rem;
  color: color-mix(in srgb, var(--neutral-color) 70%, black);
}

.sb-blockquote cite {
  font-weight: 600;
  font-style: normal;
}
/* Quote block styles with image support */
.sb-quote-with-image .sb-quote-inner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.sb-quote-image-wrapper {
  flex-shrink: 0;
}

.sb-quote-image {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sb-quote-content {
  flex-grow: 1;
  min-width: 0; /* Prevents text from overflowing */
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .sb-quote-with-image .sb-quote-inner {
      flex-direction: column;
      align-items: center;
      text-align: center;
  }
  
  .sb-quote-image {
      margin-bottom: 0.75rem;
  }
}

/* Practice Block */
.sb-practice-block {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 90%;
  margin: auto;
  margin-bottom: 2rem;
  word-wrap: break-word;
  background-color: white;
  background-clip: border-box;
  border: 1px solid color-mix(in srgb, var(--neutral-color) 20%, transparent);
  border-radius: 0.5rem;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0.125rem 0.375rem color-mix(in srgb, black 10%, transparent);
}

.sb-practice-block:hover {
  box-shadow: 0 0.5rem 1rem color-mix(in srgb, black 15%, transparent);
  transform: translateY(-3px);
}

.sb-practice-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem;
  background-color: color-mix(in srgb, var(--neutral-color) 5%, white);
  border-bottom: 1px solid color-mix(in srgb, var(--neutral-color) 15%, transparent);
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
}

.sb-practice-content {
  padding: 1.25rem;
}

.sb-practice-content h3 {
  margin-top: 0;
  color: color-mix(in srgb, var(--primary-color) 80%, black);
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.sb-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  border-radius: 9999px;
  background-color: color-mix(in srgb, var(--neutral-color) 10%, white);
  color: color-mix(in srgb, var(--neutral-color) 70%, black);
  transition: all 0.2s ease;
}

.sb-badge strong {
  margin-right: 0.25rem;
}

/* Difficulty badges */
.sb-difficulty-level[data-difficulty="beginner"] {
  background-color: color-mix(in srgb, var(--success-color) 15%, white);
  color: color-mix(in srgb, var(--success-color) 70%, black);
}

.sb-difficulty-level[data-difficulty="intermediate"] {
  background-color: color-mix(in srgb, var(--warning-color) 15%, white);
  color: color-mix(in srgb, var(--warning-color) 70%, black);
}

.sb-difficulty-level[data-difficulty="advanced"] {
  background-color: color-mix(in srgb, var(--error-color) 15%, white);
  color: color-mix(in srgb, var(--error-color) 70%, black);
}

/* Impact badges */
.sb-impact-level[data-impact="high"] {
  background-color: color-mix(in srgb, var(--info-color) 15%, white);
  color: color-mix(in srgb, var(--info-color) 70%, black);
}

.sb-impact-level[data-impact="transformative"] {
  background-color: color-mix(in srgb, var(--primary-color) 15%, white);
  color: color-mix(in srgb, var(--primary-color) 70%, black);
}

/* Focus badges */
.sb-focus-area {
  background-color: color-mix(in srgb, var(--secondary-color) 15%, white);
  color: color-mix(in srgb, var(--secondary-color) 70%, black);
}

/* Timeframe badges */
.sb-time-commitment {
  background-color: color-mix(in srgb, var(--accent-color) 15%, white);
  color: color-mix(in srgb, var(--accent-color) 70%, black);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sb-practice-metadata {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .sb-badge {
    width: 100%;
  }
}

/* Metadata Component */
.sb-metadata {
  position: relative;
  margin-bottom: 1.5rem;
  transition: all 0.2s ease-in-out;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.sb-metadata:hover {
  box-shadow: 0 0.25rem 0.5rem color-mix(in srgb, black 7.5%, transparent);
}

.sb-metadata-user {
  border-color: color-mix(in srgb, var(--secondary-color) 25%, transparent);
  background-color: color-mix(in srgb, var(--secondary-color) 5%, white);
}

.sb-metadata-dev {
  border-color: color-mix(in srgb, var(--info-color) 25%, transparent);
  background-color: color-mix(in srgb, var(--info-color) 5%, white);
}

.sb-metadata-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.sb-metadata-grid {
  display: grid;
  gap: 0.5rem;
}

.sb-metadata-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sb-metadata-label {
  font-weight: 600;
  color: color-mix(in srgb, var(--secondary-color) 70%, black);
  white-space: nowrap;
}

.sb-metadata-value {
  word-break: break-word;
}

.sb-metadata-code {
  font-family: monospace;
  background-color: color-mix(in srgb, black 5%, transparent);
  padding: 0.125rem 0.25rem;
  border-radius: 0.25rem;
  word-break: break-all;
}

.sb-metadata-tags {
  margin-top: 0.5rem;
}

.sb-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 9999px;
  background-color: color-mix(in srgb, var(--primary-color) 10%, white);
  color: color-mix(in srgb, var(--primary-color) 70%, black);
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  transition: all 0.2s ease;
}

.sb-tag:hover {
  background-color: color-mix(in srgb, var(--primary-color) 15%, white);
}

.sb-metadata-navigation {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid color-mix(in srgb, var(--secondary-color) 15%, transparent);
  display: flex;
  justify-content: space-between;
}

.sb-metadata-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.sb-metadata-nav-link:hover {
  color: color-mix(in srgb, var(--primary-color) 70%, black);
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .sb-metadata-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
  
  .sb-metadata-code {
    width: 100%;
    overflow-x: auto;
  }
}

/* Accordion Block */
.sb-accordion {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 90%;
  margin: auto;
  margin-bottom: 1.5rem;
  background-color: white;
  border: 1px solid color-mix(in srgb, var(--neutral-color) 15%, transparent);
  border-radius: 0.375rem;
  transition: all 0.5s ease-in-out;
  box-shadow: 0 0.125rem 0.25rem color-mix(in srgb, black 7.5%, transparent);
  overflow: hidden;
}

.sb-accordion:hover {
  box-shadow: 0 0.25rem 0.5rem color-mix(in srgb, black 10%, transparent);
}

.sb-accordion-toggle {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--neutral-color) 90%, black);
  text-align: left;
  background-color: color-mix(in srgb, var(--neutral-color) 5%, white);
  border: none;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.3s ease-in-out;
}

.sb-accordion-toggle:hover {
  background-color: color-mix(in srgb, var(--neutral-color) 10%, white);
}

.sb-accordion-toggle[aria-expanded="true"] {
  background-color: color-mix(in srgb, var(--neutral-color) 15%, white);
  border-bottom: 1px solid color-mix(in srgb, var(--neutral-color) 15%, transparent);
}

.sb-accordion-title {
  font-weight: 500;
}

.sb-accordion-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.sb-accordion-icon .sb-icon-plus {
  display: block;
}

.sb-accordion-icon .sb-icon-minus {
  display: none;
}

.sb-accordion-toggle[aria-expanded="true"] .sb-icon-plus {
  display: none;
}

.sb-accordion-toggle[aria-expanded="true"] .sb-icon-minus {
  display: block;
}

.sb-accordion-content {
  max-height: 0;
  overflow: scroll;
  transition: max-height 0.7s ease-in-out;
}

.sb-accordion-toggle[aria-expanded="true"] + .sb-accordion-content {
  /* max-height: dynamically set based on content height */
  max-height: 30rem;
}

@media (max-width: 768px) {
  .sb-accordion-toggle[aria-expanded="true"] + .sb-accordion-content {
    /* max-height: dynamically set based on content height */
    max-height: 24rem;
  }
}

/* ==========================================================================
   ProgressBar Component
   ========================================================================== */

.sb-accordion-body {
  padding: 1rem;
}

.sb-progress-container {
  /* Primary container, width is handled by sb-w-full utility */
  transition: all 0.2s ease-in-out;
}

.sb-progress-container:hover {
  font-weight: bold;
}

.sb-progress-label-external {
  /* Styling for label displayed above the bar */
  /* font-size, margin-bottom handled by sb-text-sm, sb-mb-1 utilities */
}

.sb-progress {
  /* The track/background of the progress bar */
  display: flex; /* Ensures children (the fill) behave as expected */
  /* width, height, bg-color, border-radius handled by utility classes */
  /* sb-overflow-hidden is crucial to clip the sb-progress-bar if rounded corners are used */
}

.sb-progress-bar {
  /* The colored fill part of the progress bar */
  /* height, bg-color, border-radius handled by utility classes */
  /* sb-flex, sb-items-center, sb-justify-center for positioning the internal label */
  color: #ffffff; /* Default text color for internal label, assuming dark fill. Adjust if needed. */
  text-align: center;
  transition: width 0.6s ease;
  position: relative; /* Helps contain absolutely positioned children if ever needed, though not used here. */
}

.sb-progress-label-internal {
  /* Styling for label displayed INSIDE the bar */
  /* font-size, font-weight, padding handled by sb-text-xs, sb-font-semibold, sb-px-1 utilities */
  /* sb-whitespace-nowrap, sb-overflow-hidden, sb-text-ellipsis ensure text behaves well if too long for the bar */
  line-height: 1; /* Helps with vertical centering and consistency */
  display: inline-block; /* Allows text-ellipsis to work with overflow:hidden */
  max-width: 100%; /* Ensures the label doesn't try to be wider than its parent bar */
}

/* Striped Effect */
.sb-progress-bar-striped {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem; /* Adjust size of stripes */
}

/* Animation for Striped Bars */
.sb-progress-bar-animated {
  animation: sb-progress-bar-stripes 1s linear infinite;
}

@keyframes sb-progress-bar-stripes {
  from { background-position-x: 1rem; }
  to { background-position-x: 0; }
}

.sb-progress-container:hover {
  font-weight: bold;
  cursor: default;
  scale: 1.05;
}


.sb-progress-popover-content {
  transition: all 0.2s ease-in-out;
  position: fixed;
  z-index: 1000;
  border: 2px solid rgb(87, 87, 87);
  border-radius: 5px;
  padding: 0.75rem; /* sb-p-3 */
  box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.15); /* var(--sb-shadow-md) */
  max-width: 90%; /* Or whatever max-width is suitable */
  pointer-events: none; /* So the popover itself doesn't interfere with mouse events on elements below it */
  /* display: none; is handled by JS and inline style */
}

.sb-animate-fade-in {
  animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}