/* ========================================
   Laravel-style Documentation Theme
   Keeping original colors and spacing
   ======================================== */

/* Import Google Fonts - Inter for body, Merriweather for headings */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Merriweather:wght@700;900&display=swap');

/* Apply fonts globally */
:root {
  --md-text-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --md-heading-font: "Merriweather", Georgia, serif;
  --md-code-font: "Fira Code", "JetBrains Mono", monospace;
}

body {
  font-family: var(--md-text-font) !important;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Black header background */
.md-header {
  background-color: #000000 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Ensure search bar looks good on black */
.md-search__form {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
}

.md-search__form:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Site background color */
body,
[data-md-color-scheme="slate"],
[data-md-color-scheme="default"] {
  background-color: #F5F7FA !important;
}

.md-main {
  background-color: #F5F7FA !important;
}

/* Full width layout */
.md-grid {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 1.5rem !important;
}

.md-main__inner {
  max-width: 100% !important;
  margin: 0 !important;
  gap: 1rem;
}

.md-content__inner {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 1.25rem 1.5rem !important;
}

/* Header full width */
.md-header__inner {
  max-width: 100% !important;
  padding: 0 1.5rem !important;
}

/* ========================================
   Left Sidebar - Laravel Style
   ======================================== */
.md-sidebar--primary {
  background-color: transparent !important;
}

.md-sidebar--primary .md-sidebar__scrollwrap {
  background-color: #ffffff;
  border-radius: 8px;
  margin: 0.75rem 0;
  padding: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  /* Don't override height/overflow - keep Material's defaults */
}

/* ========================================
   Right Sidebar (TOC) - Laravel Style
   ======================================== */
.md-sidebar--secondary {
  background-color: transparent !important;
}

.md-sidebar--secondary .md-sidebar__scrollwrap {
  background-color: #ffffff;
  border-radius: 8px;
  margin: 0.75rem 0;
  padding: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  /* Don't override height/overflow - Material needs these for scroll spy */
}

/* ========================================
   Navigation Title Styling
   ======================================== */
.md-nav__title {
  font-family: var(--md-text-font) !important;
  background-color: transparent !important;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.md-nav--primary .md-nav__title {
  background-color: transparent !important;
  box-shadow: none !important;
  margin-bottom: 0.5rem !important;
  padding-bottom: 0.35rem !important;
  border-bottom: 1px solid #e5e7eb;
}

/* TOC "On this page" title */
.md-nav--secondary .md-nav__title {
  margin-bottom: 0.4rem !important;
  padding-bottom: 0.25rem !important;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.65rem;
  color: #6b7280;
}

/* ========================================
   Navigation Links - Laravel Style
   ======================================== */
.md-nav__link {
  font-family: var(--md-text-font) !important;
  font-size: 0.8rem;
  color: #374151;
  border-radius: 4px;
  padding: 0.3rem 0.5rem !important;
  margin: 1px 0;
  transition: all 0.15s ease;
}

.md-nav__link:hover {
  color: #1a73e8;
  background-color: transparent;
}

.md-nav__link--active {
  color: #1a73e8 !important;
  font-weight: 500;
  background-color: transparent !important;
}

/* TOC links - smaller */
.md-nav--secondary .md-nav__link {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem !important;
  color: #6b7280;
}

.md-nav--secondary .md-nav__link:hover {
  color: #1a73e8;
}

/* Our custom TOC active class - based on URL */
.md-nav--secondary .md-nav__link.toc-active,
.md-sidebar--secondary .md-nav__link.toc-active,
nav.md-nav--secondary .md-nav__link.toc-active {
  color: #1a73e8 !important;
  font-weight: 600 !important;
  background-color: rgba(26, 115, 232, 0.1) !important;
  border-radius: 4px !important;
}

/* Disable Material's TOC active styling completely */
.md-nav--secondary .md-nav__link--active,
.md-sidebar--secondary .md-nav__link--active {
  color: #6b7280 !important;
  font-weight: normal !important;
  background-color: transparent !important;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Scroll margin for headings - where heading appears after clicking TOC */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  scroll-margin-top: 80px;
}


/* ========================================
   Main Content Area
   ======================================== */
.md-content {
  background-color: #ffffff !important;
  border-radius: 8px;
  margin: 0.75rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* ========================================
   Typography - Inter body, Merriweather headings
   ======================================== */
.md-typeset {
  font-family: var(--md-text-font) !important;
  font-size: 1rem;  /* 16px for readability */
  line-height: 1.7;
  color: #374151;
}

.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-family: var(--md-heading-font) !important;
  font-weight: 700;
}

.md-typeset h1 {
  font-size: 1.75rem;
  color: #111827;
  margin-bottom: 0.5rem;
  margin-top: 0;
  letter-spacing: -0.01em;
}

.md-typeset h2 {
  font-size: 1.35rem;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 0.4rem;
  margin-top: 1.5rem;
  margin-bottom: 0.6rem;
}

.md-typeset h3 {
  font-size: 1.15rem;
  color: #374151;
  margin-top: 1.25rem;
  margin-bottom: 0.45rem;
}

.md-typeset h4 {
  font-size: 1rem;
  color: #4b5563;
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.md-typeset p {
  margin-bottom: 0.65rem;
}

.md-typeset ul,
.md-typeset ol {
  margin-bottom: 0.65rem;
  padding-left: 1.25rem;
}

.md-typeset ul {
  list-style: none;
}

.md-typeset ul li {
  position: relative;
  margin-bottom: 0.35rem;
  padding-left: 0.5rem;
}

.md-typeset ul li::before {
  content: "•";
  position: absolute;
  left: -0.75rem;
  color: #1a73e8;
  font-weight: bold;
  font-size: 1.1em;
}

.md-typeset ol li {
  margin-bottom: 0.35rem;
}

.md-typeset a {
  color: #1a73e8;
  text-decoration: none;
}

.md-typeset a:hover {
  text-decoration: underline;
}

.md-typeset hr {
  margin: 0.75rem 0;
}

/* ========================================
   Table Styling - More Visible
   ======================================== */
.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #d1d5db;
  font-size: 0.8rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
}

.md-typeset table:not([class]) th {
  background-color: #f3f4f6;
  font-weight: 700;
  color: #1f2937;
  border-bottom: 2px solid #d1d5db;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.md-typeset table:not([class]) td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

.md-typeset table:not([class]) tr:hover {
  background-color: #f9fafb;
}

.md-typeset table:not([class]) tr:last-child td {
  border-bottom: none;
}

/* ========================================
   Admonition Styling - Laravel Style
   ======================================== */
.md-typeset .admonition {
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  margin: 0.75rem 0;
  font-size: 0.85rem;
  padding-bottom: 0.75rem;
}

.md-typeset .admonition-title {
  border-radius: 6px 6px 0 0;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5rem 0.85rem;
  margin-bottom: 0 !important;
}

.md-typeset .admonition-title + * {
  margin-top: 0.5rem !important;
}

.md-typeset .admonition > :not(.admonition-title) {
  padding: 0 0.85rem;
}

.md-typeset .admonition p {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.md-typeset .admonition > p:last-child {
  margin-bottom: 0;
}

.md-typeset .admonition strong {
  color: #1f2937;
}

/* ========================================
   Code Styling
   ======================================== */
.md-typeset code {
  font-size: 0.85em;
  background-color: #f3f4f6;
  border-radius: 4px;
  padding: 0.15rem 0.35rem;
  color: #1f2937;
}

.md-typeset pre {
  border-radius: 6px;
}

/* ========================================
   Scrollbar styling
   ======================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media screen and (max-width: 76.25em) {
  .md-sidebar--secondary .md-sidebar__scrollwrap {
    margin: 0;
  }
}

@media screen and (max-width: 60em) {
  .md-grid {
    padding: 0 1rem !important;
  }
  
  .md-content__inner {
    padding: 1rem !important;
  }
  
  .md-sidebar--primary .md-sidebar__scrollwrap {
    background-color: #ffffff;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
  }
  
  .md-typeset {
    font-size: 0.9rem;
  }
}

@media screen and (max-width: 450px) {
  .md-grid {
    padding: 0 0.5rem !important;
  }
  
  .md-content__inner {
    padding: 0.75rem !important;
  }
  
  .md-typeset {
    font-size: 0.85rem;
  }
  
  .md-typeset h1 {
    font-size: 1.6rem;
  }
  
  .md-typeset h2 {
    font-size: 1.25rem;
  }
  
  .md-typeset table:not([class]) td,
  .md-typeset table:not([class]) th {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
}

/* ========================================
   Footer - Hidden
   ======================================== */
.md-footer {
  display: none !important;
}
