/* Local styles for Random Effects */

/* Remove gradient from section boxes (Overview, Mathematical Formulation, etc.) */
.light-page .box {
  background: #ffffff;
}
.light-page .box.tint {
  background: #ffffff;
}

/* Collapsible section banners: clean, modern, order-independent */
.article-content details.collapsible {
  position: relative;
  padding: 0;
  overflow: hidden;
  border-left: 3px solid rgba(14, 165, 168, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.article-content details.collapsible:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.08), 0 4px 10px rgba(2, 6, 23, 0.04);
  border-left-color: rgba(14, 165, 168, 0.85);
}
.article-content details.collapsible[open] {
  border-left-color: rgba(14, 165, 168, 0.85);
}

.article-content details.collapsible > summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding: 0.95rem 2.75rem 0.95rem 1.4rem;
  background: linear-gradient(90deg, rgba(14, 165, 168, 0.09) 0%, rgba(14, 165, 168, 0.03) 60%, rgba(245, 158, 11, 0.04) 100%);
  user-select: none;
  transition: background 0.2s ease;
}
.article-content details.collapsible:hover > summary {
  background: linear-gradient(90deg, rgba(14, 165, 168, 0.16) 0%, rgba(14, 165, 168, 0.06) 60%, rgba(245, 158, 11, 0.07) 100%);
}
.article-content details.collapsible[open] > summary {
  background: linear-gradient(90deg, rgba(14, 165, 168, 0.18) 0%, rgba(14, 165, 168, 0.08) 60%, rgba(245, 158, 11, 0.08) 100%);
  border-bottom: 1px solid rgba(14, 165, 168, 0.18);
}
.article-content details.collapsible > summary::-webkit-details-marker {
  display: none;
}
.article-content details.collapsible > summary::marker {
  content: "";
}
.article-content details.collapsible > summary > .box-heading {
  font-weight: 600;
  color: #0f172a;
  letter-spacing: 0.005em;
}

/* Body padding (was absorbed by .box padding before) */
.article-content details.collapsible > .box-body {
  padding: 1rem 1.5rem 1.25rem 1.5rem;
}

/* Plus icon on the right, rotates 45deg to "x" when open */
.article-content details.collapsible > summary::after {
  content: "";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(currentColor, currentColor) center/2px 14px no-repeat,
    linear-gradient(currentColor, currentColor) center/14px 2px no-repeat;
  color: rgba(14, 165, 168, 0.75);
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.25s ease, color 0.2s ease;
}
.article-content details.collapsible:hover > summary::after {
  color: rgba(14, 165, 168, 1);
}
.article-content details.collapsible[open] > summary::after {
  transform: translateY(-50%) rotate(45deg);
}

/* Feature grid adjustments */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Disabled feature card styling */
.feature-disabled {
  position: relative;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}

.feature-disabled::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(148, 163, 184, 0.03) 10px,
    rgba(148, 163, 184, 0.03) 20px
  );
  pointer-events: none;
  border-radius: inherit;
}

/* Code box improvements */
.mycodebox {
  position: relative;
}

.mycodebox::before {
  content: 'Python';
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.7rem;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Math display centering */
.math.display {
  display: block;
  text-align: center;
  margin: 1rem 0;
}

/* Box section styling */
.box h3 {
  margin-top: 0;
  color: #1e293b;
  font-size: 1.25rem;
  font-weight: 600;
}

.box h4 {
  color: #334155;
  font-size: 1rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
}

.box ul {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.box li {
  margin: 0.35rem 0;
  line-height: 1.6;
}

/* Parameter table styling */
.param-table {
  font-size: 0.95rem;
}

.param-table code {
  background: #f1f5f9;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #6366f1;
}

/* Example links */
.example-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.example-links li {
  margin: 0.5rem 0;
}

.example-links a {
  color: #4f46e5;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.example-links a:hover {
  color: #6366f1;
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .use-case-grid {
    grid-template-columns: 1fr;
  }
}
