/* ========================================
   Theme Colors - Intel Blue
   ======================================== */
:root {
  --md-primary-fg-color: #0071c5;
  --md-primary-fg-color--light: #cad0d4;
  --md-primary-fg-color--dark: #005a9f;
  --intel-header-height: 60px; /* Intel IGHF header */
  --mkdocs-header-height: 64px; /* MkDocs header */
  --header-height: 124px; /* Combined height for desktop */
  --header-height-mobile: 60px; /* Only Intel header on mobile */
  --sidebar-width: clamp(280px, 25vw, 360px); /* Min 280px, ideal 25%, max 360px */
  --intel-breakpoint-mobile: 768px; /* Intel standard mobile breakpoint */
  --intel-breakpoint-tablet: 1024px; /* Intel standard tablet breakpoint */
}

/* ========================================
   Hide Table of Contents - More space for tables
   ======================================== */
.md-sidebar--secondary {
  display: none !important;
}

/* Expand main content to use TOC space */
.md-content {
  margin-right: 0 !important;
}

.md-main__inner {
  margin-right: 0 !important;
}

/* ========================================
   Typography - Match Intel Style
   ======================================== */
body {
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Platform names and main navigation items */
.md-nav__item--section > .md-nav__link,
.md-nav__item--nested > .md-nav__link {
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--md-primary-fg-color) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hover state for platform names */
.md-nav__item--section > .md-nav__link:hover,
.md-nav__item--nested > .md-nav__link:hover {
  color: var(--md-primary-fg-color--dark) !important;
}

/* Sub-navigation items */
.md-nav__item .md-nav__link {
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 0.85rem;
}

/* Restore proper navigation styling */
.md-nav__list {
  padding: 0;
  margin: 0;
}

.md-nav__item {
  margin: 0;
}

.md-nav__link {
  padding: 0.6rem 1rem;
  margin: 0;
  display: block;
  transition: background-color 0.2s;
  line-height: 1.4;
}

.md-nav__link:hover {
  background-color: rgba(0, 113, 197, 0.05);
}

/* Clean navigation - let Material Design handle spacing naturally */

/* Event category navigation (Core Events, Uncore Events, Offcore Events) */
.md-nav__item--nested .md-nav__item--nested > .md-nav__link {
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  color: #666;
  text-transform: none;
  letter-spacing: 0.2px;
  padding-left: 1.5rem;
  margin-left: 0.5rem;
  border-left: 2px solid #e0e0e0;
}

/* Third level navigation items (P-Core Events, E-Core Events, etc.) */
.md-nav__item--nested .md-nav__item--nested .md-nav__item > .md-nav__link {
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  color: #777;
  text-transform: none;
  padding-left: 2rem;
  margin-left: 1rem;
}

/* Page headings */
h1, h2, h3, h4, h5, h6 {
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* Specific heading sizes to match Intel styling */
.md-typeset h1 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  color: var(--md-primary-fg-color);
  border-bottom: 2px solid var(--md-primary-fg-color);
  padding-bottom: 0.375rem;
}

.md-typeset h2 {
  font-size: 1.375rem;
  margin-bottom: 0.875rem;
  margin-top: 1.25rem;
  color: var(--md-primary-fg-color);
}

.md-typeset h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  margin-top: 1rem;
  color: #444;
}

.md-typeset h4 {
  font-size: 1rem;
  margin-bottom: 0.625rem;
  margin-top: 0.875rem;
  color: #555;
}

/* Additional typography elements */
.md-typeset code {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 0.75rem;
  background-color: #f5f5f5;
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  color: #d63384;
}

.md-typeset pre {
  background-color: #f8f9fa;
  border-left: 4px solid var(--md-primary-fg-color);
  padding: 0.75rem;
  margin: 1rem 0;
  overflow-x: auto;
  font-size: 0.75rem;
}

.md-typeset blockquote {
  border-left: 4px solid var(--md-primary-fg-color);
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background-color: #f8f9ff;
  font-style: italic;
  font-size: 0.875rem;
}

/* Responsive typography for mobile */
@media (max-width: 768px) {
  .md-typeset p,
  .md-typeset li {
    font-size: 0.8125rem;
  }
  
  .md-typeset h1 {
    font-size: 1.5rem;
  }
  
  .md-typeset h2 {
    font-size: 1.25rem;
  }
  
  .md-typeset h3 {
    font-size: 1rem;
  }
  
  .md-typeset h4 {
    font-size: 0.9375rem;
  }
}

/* ========================================
   Intel Global Header & Footer
   ======================================== */
#recode50header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200; /* Higher than MkDocs header */
  background: var(--md-default-bg-color);
  height: var(--intel-header-height);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Intel header responsive behavior - always visible */
@media screen and (max-width: 768px) {
  #recode50header {
    z-index: 300; /* Even higher on mobile to stay above navigation */
  }
}

/* Override autohide - keep headers always visible */
.md-header,
.md-header[data-md-state="hidden"] {
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Keep Intel header always visible too */
#recode50header {
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#recode50footer {
  margin-top: 2rem;
  position: relative;
  z-index: 100;
}

/* ========================================
   MkDocs Header - Blue header with search box below Intel header
   ======================================== */
.md-header {
  position: fixed;
  top: var(--intel-header-height);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 150;
  background: var(--md-primary-fg-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  height: var(--mkdocs-header-height);
  transform: none;
}

.md-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 0 1rem;
  height: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.md-header__title {
  flex: 0 0 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
  color: white;
  font-weight: 600;
  order: 2;
}

.md-search {
  flex: 1;
  max-width: 400px;
  order: 3;
  margin: 0 1rem;
  position: relative;
}

.md-search__form {
  position: relative;
  display: block;
}

.md-search__icon {
  position: absolute;
  left: 0.75rem;
  top: 0.7rem;
  color: #1e3a8a !important; /* Navy blue */
  pointer-events: none;
  z-index: 2;
  width: 1.1rem;
  height: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.md-header__button {
  flex: 0 0 auto;
  order: 1;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.25rem;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
}

.md-header__button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}



/* Search input styling - dark text on light background for visibility */
.md-search__input {
  background: rgba(255, 255, 255, 0.9) !important;
  color: #333 !important;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  border-radius: 0.2rem !important;
  padding: 0.5rem 1rem 0.5rem 2.5rem !important;
  font-size: 0.9rem !important;
  line-height: 1.5 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 2.5rem !important;
  font-family: inherit !important;
  -webkit-text-fill-color: #333 !important;
  -webkit-opacity: 1 !important;
  opacity: 1 !important;
}

.md-search__input::placeholder {
  color: #666 !important;
  -webkit-text-fill-color: #666 !important;
}

.md-search__input:focus {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(255, 255, 255, 1) !important;
  outline: none !important;
  color: #333 !important;
  -webkit-text-fill-color: #333 !important;
}

/* Ensure search results are properly positioned */
.md-search__suggest {
  color: rgba(255, 255, 255, 0.7);
}

.md-search__scrollwrap {
  background-color: white;
}

/* Search results styling */
.md-search__output {
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 0.2rem;
  max-height: 75vh;
  overflow-y: auto;
}



/* Mobile Navigation - Hamburger Menu Display */
@media screen and (max-width: 76.25em) {
  .md-header__button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .md-header__title {
    max-width: 150px;
  }
  
  .md-search {
    max-width: 250px;
  }
}

@media screen and (max-width: 1220px) {
  .md-header__button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
}

@media screen and (max-width: 768px) {
  .md-header__button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Ensure sidebar works on mobile */
  .md-sidebar--primary {
    position: fixed !important;
    top: var(--header-height) !important;
    left: 0 !important;
    width: 85vw !important;
    max-width: 320px !important;
    height: calc(100vh - var(--header-height)) !important;
    z-index: 200 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s cubic-bezier(0.1, 0.7, 0.1, 1) !important;
    background: white !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1) !important;
  }
  
  .md-sidebar--primary[data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--primary,
  .md-toggle[data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--primary {
    transform: translateX(0) !important;
  }
  
  /* Fix sidebar scrollable area on mobile */
  .md-sidebar--primary .md-sidebar__scrollwrap {
    padding-top: 1rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    padding-bottom: 1rem !important;
    overflow-y: auto !important;
    height: 100% !important;
  }
  
  .md-sidebar--primary .md-sidebar__inner {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  /* Ensure navigation items are visible and readable */
  .md-nav__link {
    white-space: normal !important;
    word-wrap: break-word !important;
    padding: 0.6rem 0.5rem !important;
    font-size: 0.85rem !important;
  }
}

@media screen and (max-width: 480px) {
  .md-header__button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .md-search {
    max-width: 200px;
  }
}



/* ========================================
   Main Container - Below Both Headers
   ======================================== */
.md-container {
  padding-top: var(--header-height);
}

.md-main {
  margin-left: 0;
  padding-left: 0;
}

.md-main__inner {
  margin-left: 0;
  padding-left: 0;
}

.md-grid {
  margin-left: 0;
  padding-left: 0;
  max-width: none;
}

/* ========================================
   Sidebar Navigation - Left Side
   ======================================== */
.md-sidebar--primary {
  /* Let Material theme handle positioning for responsive behavior */
  background-color: #f5f7fa;
}

/* Mobile sidebar overlay */
@media screen and (max-width: 768px) {
  .md-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.54);
    z-index: 199;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
  }
  
  .md-sidebar--primary[data-md-toggle="drawer"]:checked ~ .md-overlay,
  .md-toggle[data-md-toggle="drawer"]:checked ~ .md-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Tablet adjustments */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .md-header__inner {
    padding: 0 2rem;
  }
  
  .md-search {
    width: 300px;
  }
}

/* Large desktop optimizations */
@media screen and (min-width: 1200px) {
  .md-header__inner {
    max-width: 1400px;
    margin: 0 auto;
  }
}

/* Desktop-specific sidebar styling */
@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    max-height: calc(100vh - var(--header-height));
    overflow: hidden;
    z-index: 1;
  }
}

.md-sidebar--primary .md-sidebar__scrollwrap {
  padding-top: 2rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-bottom: 1rem;
  overflow-y: auto !important;
  height: calc(100vh - var(--header-height, 124px)) !important;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(0, 113, 197, 0.3) transparent; /* Firefox */
}

/* Professional scrollbar styling for Webkit browsers (Chrome, Edge, Safari) */
.md-sidebar--primary .md-sidebar__scrollwrap::-webkit-scrollbar {
  width: 8px;
}

.md-sidebar--primary .md-sidebar__scrollwrap::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
}

.md-sidebar--primary .md-sidebar__scrollwrap::-webkit-scrollbar-thumb {
  background: rgba(0, 113, 197, 0.3);
  border-radius: 4px;
  transition: background 0.2s;
}

.md-sidebar--primary .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 113, 197, 0.5);
}

.md-sidebar--primary .md-sidebar__scrollwrap::-webkit-scrollbar-thumb:active {
  background: rgba(0, 113, 197, 0.7);
}

.md-sidebar--primary .md-sidebar__inner {
  padding-left: 0;
  padding-right: 0;
}

/* Fix for selected navigation items being hidden under header */
.md-nav__link--active,
.md-nav__item--active > .md-nav__link {
  scroll-margin-top: calc(var(--header-height, 124px) + 2rem) !important;
  position: relative;
}

/* Active navigation sections styling - eliminate all visual gaps */
  .md-nav__link--active,
  .md-nav__item--active > .md-nav__link {
    margin: 0 !important;
    padding: 0.5rem 1rem 0.5rem 0.75rem !important;
    background-color: rgba(0, 113, 197, 0.1);
    border-left: 4px solid var(--md-primary-fg-color);
    border-top: none !important;
    border-bottom: none !important;
    font-weight: 700;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
  }
  
  /* Fix for the selected platform specifically - no gap above */
  .md-nav__item--section.md-nav__item--active > .md-nav__link,
  .md-nav__item--nested.md-nav__item--active > .md-nav__link {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    background-color: rgba(0, 113, 197, 0.1);
    border-left: 4px solid var(--md-primary-fg-color);
    border-top: none !important;
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
  }
  
  /* Nested active items - no gap above */
  .md-nav__item--nested .md-nav__item--active > .md-nav__link,
  .md-nav__item--nested .md-nav__item[data-md-state="active"] > .md-nav__link {
    margin: 0 !important;
    padding: 0.5rem 1rem 0.5rem 0.75rem !important;
    background-color: rgba(0, 113, 197, 0.1);
    border-left: 4px solid var(--md-primary-fg-color);
    border-top: none !important;
    font-weight: 700;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box !important;
    line-height: 1.2 !important;
  }
  
  /* Adjust sidebar scroll position to account for header */
  .md-sidebar--primary .md-sidebar__scrollwrap {
    scroll-padding-top: calc(var(--header-height, 124px) + 2rem);
  }

/* ========================================
   Main Content Area - Right of Sidebar
   ======================================== */
.md-content {
  margin-top: 0;
}

/* Only add sidebar margin on desktop */
@media screen and (min-width: 76.25em) {
  .md-content {
    margin-left: var(--sidebar-width);
  }
}

.md-content__inner {
  padding: 1.5rem;
  padding-top: 2rem;
  padding-left: 2rem;
  max-width: 100%;
  margin-left: 0;
}

/* Allow content to expand on larger screens for wide tables */
@media screen and (min-width: 76.25em) {
  .md-content__inner {
    max-width: none;
    overflow-x: visible;
  }
}

/* ========================================
   Responsive Design
   ======================================== */
@media screen and (max-width: 60em) {
  .md-content__inner {
    padding: 1rem;
  }
  
  /* Allow wrapping on smaller screens but maintain font size */
  .md-nav__item--section > .md-nav__link,
  .md-nav__item--nested > .md-nav__link {
    white-space: normal;
    letter-spacing: 0.3px;
    /* Keep original font-size: 0.9rem from base styles */
  }
}


  
  /* Basic typography adjustments for mobile - maintain font size */
  .md-nav__item--section > .md-nav__link,
  .md-nav__item--nested > .md-nav__link {
    /* Keep original font-size: 0.9rem from base styles */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 0.5rem;
  }
  
  /* Content area adjustments */
  .md-content__inner {
    padding: 1rem;
  }
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.md-sidebar--primary::-webkit-scrollbar {
  width: 8px;
}

.md-sidebar--primary::-webkit-scrollbar-track {
  background: transparent;
}

.md-sidebar--primary::-webkit-scrollbar-thumb {
  background: #b5b5b5;
  border-radius: 4px;
}

.md-sidebar--primary::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}



/* ========================================
   Base Typography - Intel Fonts
   ======================================== */

/* Base Material Design typography */
.md-typeset {
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Navigation and header elements use Intel Clear */
.md-header__title,
.md-nav__title,
.md-nav__link,
.md-search__input,
.md-footer {
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Content typography */
.md-typeset p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1em;
}

.md-typeset .admonition p {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.875em;
}

.md-typeset li {
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 0.375em;
}



/* ========================================
   Content Boxes
   ======================================== */

/* Gray content boxes for introduction and notes */
.content-box {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.content-box h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
  font-weight: 600;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
}

.content-box p {
  margin-bottom: 12px;
  line-height: 1.6;
}

.content-box p:last-child {
  margin-bottom: 0;
}

/* Style admonitions with gray background similar to content boxes */
.md-typeset .admonition {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  margin: 24px 0;
}

.md-typeset .admonition-title {
  background-color: #495057;
  color: white;
  font-weight: 600;
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  border-radius: 8px 8px 0 0;
  margin: 0;
  padding: 14px 18px;
}

.md-typeset .admonition-title::before {
  display: none; /* Hide the default icon */
}

.md-typeset .admonition > :last-child {
  margin-bottom: 0;
}

/* Custom styling for info admonition - professional gray styling */
.md-typeset .admonition.info {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-left: 4px solid #6c757d;
}



/* ========================================
   Responsive Material Design Tables
   ======================================== */

/* Table wrapper - allow table to expand without scrolling */
.md-typeset__table {
  overflow-x: visible;
  width: auto;
  max-width: none;
}

/* Allow typeset container to expand on larger screens */
@media screen and (min-width: 76.25em) {
  .md-typeset {
    max-width: none;
  }
}

/* Responsive table container */
.md-typeset table {
  display: table;
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 24px 0;
  background: #ffffff;
}

/* Large screens - make table much wider for better spread */
@media (min-width: 1200px) {
  .md-typeset table {
    width: 160%;
  }
}

/* Simple approach - just make columns fit better */
@media screen and (max-width: 1200px) {
  .md-typeset table thead tr th:first-child,
  .md-typeset table tbody tr td:first-child {
    width: 15% !important;
  }
  
  .md-typeset table thead tr th:nth-child(2),
  .md-typeset table tbody tr td:nth-child(2) {
    width: 55% !important;
  }
  
  .md-typeset table thead tr th:last-child,
  .md-typeset table tbody tr td:last-child {
    width: 30% !important;
  }
}

/* Medium screens - even smaller event name column */
@media screen and (max-width: 900px) {
  .md-typeset table thead tr th:first-child,
  .md-typeset table tbody tr td:first-child {
    width: 12% !important;
  }
  
  .md-typeset table thead tr th:nth-child(2),
  .md-typeset table tbody tr td:nth-child(2) {
    width: 58% !important;
  }
  
  .md-typeset table thead tr th:last-child,
  .md-typeset table tbody tr td:last-child {
    width: 30% !important;
  }
}

/* Table header styling */
.md-typeset table thead {
  background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-primary-fg-color--dark) 100%);
}

.md-typeset table thead tr th {
  background: transparent;
  color: #ffffff !important;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  text-align: left;
  border: none;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: normal;
  word-wrap: break-word;
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.md-typeset table thead tr th:first-child {
  border-radius: 8px 0 0 0;
}

.md-typeset table thead tr th:last-child {
  border-radius: 0 8px 0 0;
}

/* Table body styling */
.md-typeset table tbody tr {
  transition: background-color 0.2s ease, transform 0.2s ease;
  border-bottom: 1px solid #f0f0f0;
}

.md-typeset table tbody tr:hover {
  background-color: #f8f9fa;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.md-typeset table tbody tr:last-child {
  border-bottom: none;
}

.md-typeset table tbody tr:last-child td:first-child {
  border-radius: 0 0 0 8px;
}

.md-typeset table tbody tr:last-child td:last-child {
  border-radius: 0 0 8px 0;
}

/* Table cell styling - base styles only */
.md-typeset table tbody tr td {
  padding: 12px 16px;
  border: none;
  vertical-align: top;
  line-height: 1.5;
  font-size: 0.7rem;
  color: #424242;
  word-wrap: break-word;
  white-space: normal;
}

/* Description column - make wider for better readability */
.md-typeset table tbody tr td:nth-child(2) {
  width: 45%;
  min-width: 400px;
}

/* Programming Info column - more space to prevent truncation */
.md-typeset table tbody tr td:last-child {
  width: 35%;
  min-width: 350px;
}

/* Event Name column - keep on single line, no wrapping */
.md-typeset table tbody tr td:first-child {
  font-weight: 600;
  color: var(--md-primary-fg-color);
  background-color: #f8f9ff;
  border-right: 2px solid #e3f2fd;
  font-family: "Intel Clear", "Intel One", "Consolas", "Monaco", monospace;
  font-size: 0.65rem;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3;
  width: auto;
  min-width: fit-content;
  padding-right: 20px;
}

/* Responsive font sizes for better fitting - maintain Event Name size */
@media (max-width: 1200px) {
  .md-typeset table {
    font-size: 0.62rem;
  }
  
  /* Keep Event Name column same size as base table font */
  .md-typeset table tbody tr td:first-child {
    font-size: inherit;
  }
  
  .md-typeset table tbody tr td:last-child {
    font-size: 0.52rem;
  }
}

@media (max-width: 960px) {
  .md-typeset table {
    font-size: 0.58rem;
  }
  
  /* Keep Event Name column same size as base table font */
  .md-typeset table tbody tr td:first-child {
    font-size: inherit;
  }
  
  .md-typeset table tbody tr td:last-child {
    font-size: 0.48rem;
  }
}

@media (max-width: 768px) {
  .md-typeset table {
    font-size: 0.54rem;
  }
  
  /* Keep Event Name column same size as base table font */
  .md-typeset table tbody tr td:first-child {
    font-size: inherit;
    width: 25% !important;
    min-width: 100px !important;
  }
  
  .md-typeset table tbody tr td:nth-child(2) {
    width: 45% !important;
  }
  
  .md-typeset table tbody tr td:last-child {
    font-size: 0.45rem;
    width: 30% !important;
  }
}

@media (max-width: 480px) {
  .md-typeset table {
    font-size: 0.5rem;
  }
  
  /* Keep Event Name column same size as base table font */
  .md-typeset table tbody tr td:first-child {
    font-size: inherit;
    width: 30% !important;
    min-width: 120px !important;
  }
  
  .md-typeset table tbody tr td:nth-child(2) {
    width: 40% !important;
  }
  
  .md-typeset table tbody tr td:last-child {
    font-size: 0.42rem;
    width: 30% !important;
  }
}

/* Set column widths for three-column event tables - Desktop */
.md-typeset table thead tr th:first-child,
.md-typeset table tbody tr td:first-child {
  width: 20%;
}

.md-typeset table thead tr th:nth-child(2),
.md-typeset table tbody tr td:nth-child(2) {
  width: 50%;
}

.md-typeset table thead tr th:last-child,
.md-typeset table tbody tr td:last-child {
  width: 30%;
}

/* Large screens - compact event names, more space for content */
@media (min-width: 1200px) {
  .md-typeset table thead tr th:first-child,
  .md-typeset table tbody tr td:first-child {
    width: 18%;
  }
  
  .md-typeset table thead tr th:nth-child(2),
  .md-typeset table tbody tr td:nth-child(2) {
    width: 47%;
  }
  
  .md-typeset table thead tr th:last-child,
  .md-typeset table tbody tr td:last-child {
    width: 35%;
  }
}

/* Description column - allow text wrapping */
.md-typeset table tbody tr td:nth-child(2) {
  white-space: normal;
  word-wrap: break-word;
  line-height: 1.7;
  overflow-wrap: break-word;
}

/* Programming Info column - monospace for code */
.md-typeset table tbody tr td:last-child {
  font-family: "Consolas", "Monaco", "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace !important;
  font-size: 0.7rem !important;
  background-color: #fafafa;
  border-left: 2px solid #e0e0e0;
  color: #666;
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Tablet breakpoint - adjust for medium screens */
@media (max-width: 992px) and (min-width: 769px) {
  .md-typeset table {
    width: 100%;
  }
  
  .md-typeset table thead tr th:first-child,
  .md-typeset table tbody tr td:first-child {
    width: 22%;
  }
  
  .md-typeset table thead tr th:nth-child(2),
  .md-typeset table tbody tr td:nth-child(2) {
    width: 48%;
  }
  
  .md-typeset table thead tr th:last-child,
  .md-typeset table tbody tr td:last-child {
    width: 30%;
  }
}

/* Mobile landscape - all columns visible */
@media (max-width: 768px) {
  .md-typeset table {
    font-size: 0.65rem;
    margin: 16px 0;
    width: 100%;
  }
  
  .md-typeset table thead tr th,
  .md-typeset table tbody tr td {
    padding: 8px 4px;
  }
  
  .md-typeset table thead tr th {
    font-size: 0.6rem;
  }
  
  .md-typeset table thead tr th:first-child,
  .md-typeset table tbody tr td:first-child {
    width: 25%;
  }
  
  .md-typeset table thead tr th:nth-child(2),
  .md-typeset table tbody tr td:nth-child(2) {
    width: 45%;
  }
  
  .md-typeset table thead tr th:last-child,
  .md-typeset table tbody tr td:last-child {
    width: 30%;
  }
  
  .md-typeset table tbody tr td:first-child {
    font-size: 0.45rem;
  }
  
  .md-typeset table tbody tr td:last-child {
    font-size: 0.5rem;
  }
}

/* Mobile portrait - very compact with horizontal scroll - maintain Event Name size */
@media (max-width: 480px) {
  .md-typeset table {
    font-size: 0.55rem;
    margin: 16px 0;
    width: 100%;
    border-radius: 0;
  }
  
  .md-typeset table thead tr th,
  .md-typeset table tbody tr td {
    padding: 6px 3px;
  }
  
  .md-typeset table thead tr th {
    font-size: 0.55rem;
  }
  
  .md-typeset table thead tr th:first-child,
  .md-typeset table tbody tr td:first-child {
    width: 28%;
  }
  
  .md-typeset table thead tr th:nth-child(2),
  .md-typeset table tbody tr td:nth-child(2) {
    width: 42%;
  }
  
  .md-typeset table thead tr th:last-child,
  .md-typeset table tbody tr td:last-child {
    width: 30%;
  }
  
  /* Keep Event Name column same size as base table font */
  .md-typeset table tbody tr td:first-child {
    font-size: inherit;
  }
  
  .md-typeset table tbody tr td:nth-child(2) {
    font-size: inherit;
  }
  
  .md-typeset table tbody tr td:last-child {
    font-size: 0.48rem;
  }
}

/* Extra small screens - maintain consistent font sizes */
@media (max-width: 320px) {
  /* Keep Event Name and Description columns same size as base table font */
  .md-typeset table tbody tr td:first-child {
    font-size: inherit;
  }
  
  .md-typeset table tbody tr td:nth-child(2) {
    font-size: inherit;
  }
  
  .md-typeset table tbody tr td:last-child {
    font-size: 0.48rem;
  }
}

/* Loading animation for tables */
.md-typeset table tbody tr {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Zebra striping for better readability */
.md-typeset table tbody tr:nth-child(even) {
  background-color: #fafafa;
}

.md-typeset table tbody tr:nth-child(even):hover {
  background-color: #f0f4f8;
}

/* Table scrollbar styling */
.md-typeset table::-webkit-scrollbar {
  height: 8px;
}

.md-typeset table::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.md-typeset table::-webkit-scrollbar-thumb {
  background: var(--md-primary-fg-color);
  border-radius: 4px;
}

.md-typeset table::-webkit-scrollbar-thumb:hover {
  background: var(--md-primary-fg-color--dark);
}

.md-typeset .admonition.info .admonition-title {
  background-color: #6c757d;
  color: white;
}

/* Hide admonition titles and adjust styling */
.md-typeset .admonition.info .admonition-title {
  display: none;
}

.md-typeset .admonition.info {
  border-radius: 8px;
  padding-top: 18px;
}

/* ========================================
   Table Copy Functionality
   ======================================== */

/* Make table cells clickable for copy functionality */
.md-typeset table tbody tr td {
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.md-typeset table tbody tr td:hover {
  background-color: rgba(0, 113, 197, 0.08) !important;
}

/* Copy button styling */
.copy-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--md-primary-fg-color);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.md-typeset table tbody tr td:hover .copy-btn {
  opacity: 1;
}

.copy-btn:hover {
  background: var(--md-primary-fg-color--dark);
}

.copy-btn:active {
  transform: scale(0.95);
}

/* Share button styling - positioned next to copy button */
.share-btn {
  position: absolute;
  top: 4px;
  right: 44px; /* Position to the left of copy button */
  background: #28a745; /* Green for sharing */
  color: white;
  border: none;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 10;
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.md-typeset table tbody tr td:hover .share-btn {
  opacity: 1;
}

.share-btn:hover {
  background: #218838; /* Darker green on hover */
}

.share-btn:active {
  transform: scale(0.95);
}

/* Special styling for Event Name column cells with both buttons */
.md-typeset table tbody tr td:first-child {
  padding-right: 90px; /* Extra padding for both buttons */
}

/* Ensure other columns don't have extra padding */
.md-typeset table tbody tr td:not(:first-child) {
  padding-right: 50px; /* Normal padding for copy button only */
}

/* Text highlighting for shared URL events - similar to search highlighting */
.event-text-highlight {
  background-color: #ffff00 !important; /* Bright yellow */
  color: #000 !important;
  padding: 2px 4px;
  border-radius: 3px;
  font-weight: 700 !important;
  border: 1px solid #cccc00;
  display: inline;
}

/* Copy feedback styling */
.copy-feedback {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--md-primary-fg-color);
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-family: "Intel Clear", "Intel One", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 113, 197, 0.3);
}

.copy-feedback.show {
  opacity: 1;
}

/* Responsive copy and share button adjustments */
@media (max-width: 768px) {
  .copy-btn {
    font-size: 9px;
    padding: 2px 4px;
    top: 2px;
    right: 2px;
  }
  
  .share-btn {
    font-size: 9px;
    padding: 2px 4px;
    top: 2px;
    right: 38px; /* Adjust for smaller copy button */
  }
}

@media (max-width: 480px) {
  .copy-btn {
    font-size: 8px;
    padding: 1px 3px;
  }
  
  .share-btn {
    font-size: 8px;
    padding: 1px 3px;
    right: 34px; /* Adjust for smaller copy button */
  }
}

/* ========================================
   Scroll to Top Functionality
   ======================================== */

/* Main scroll to top button */
.scroll-to-top-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: var(--md-primary-fg-color);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 113, 197, 0.4);
}

.scroll-to-top-btn:hover {
  background: var(--md-primary-fg-color--dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 113, 197, 0.5);
}

.scroll-to-top-btn:active {
  transform: translateY(0);
}

/* Table navigation controls */
.table-navigation {
  margin: 16px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid var(--md-primary-fg-color);
}

.table-nav-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.table-nav-btn {
  padding: 6px 12px;
  background: var(--md-primary-fg-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.table-nav-btn:hover {
  background: var(--md-primary-fg-color--dark);
}

.table-info {
  font-size: 12px;
  color: #666;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .scroll-to-top-btn {
    width: 44px;
    height: 44px;
    bottom: 16px;
    right: 16px;
    font-size: 12px;
  }
  
  .table-nav-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .table-nav-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .scroll-to-top-btn {
    width: 40px;
    height: 40px;
    bottom: 12px;
    right: 12px;
    font-size: 11px;
  }
}

