/* Custom Stylesheet for SurfCalc Documentation (ReadTheDocs Theme) */

/* ========================================== */
/* 1. Global / Light Mode Styles (Default)     */
/* ========================================== */

/* Sidebar Top (Search and Logo Area) */
.wy-side-nav-search {
  background-color: #ffffff !important; /* White Background */
  border-bottom: 1px solid #cbd5e0;
}

/* Sidebar Logo - Transparent background */
.wy-side-nav-search a img {
  content: url('../logos/surfcalc_logo_light.png') !important;
  background-color: transparent !important;
  padding: 0;
  box-shadow: none !important;
  max-height: 80px;
  max-width: 80px;
  margin: 12px auto !important;
  display: block;
  object-fit: contain;
}

/* Sidebar Title Link */
.wy-side-nav-search > a {
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: bold;
  font-size: 110%;
  color: #0f172a !important; /* Dark Slate Navy */
}

/* Search input inside sidebar */
.wy-side-nav-search input[type=text] {
  border-radius: 20px;
  border: 1px solid #cbd5e0;
  padding: 6px 12px;
  font-size: 90%;
  background-color: #f8fafc;
  color: #0f172a;
}

/* Sidebar Navigation Area (Bottom) */
.wy-nav-side {
  background-color: #0f172a !important; /* Dark Slate Navy */
}

/* Navigation Menu Links */
.wy-menu-vertical a {
  color: #ffffff !important;
}

.wy-menu-vertical a:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

/* Active navigation item */
.wy-menu-vertical li.current {
  background-color: #1e293b !important;
}

.wy-menu-vertical li.current > a {
  background-color: #1e293b !important;
  color: #0ea5e9 !important; /* SurfCalc Sky Blue */
  border-right: 4px solid #0ea5e9;
  font-weight: bold;
}

/* Section Headings inside Sidebar */
.wy-menu-vertical p.caption {
  color: #0ea5e9 !important; /* SurfCalc Sky Blue accent */
  font-weight: bold;
  font-size: 85%;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 15px;
  margin-bottom: 5px;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 5px;
}

/* Main Content Headings */
.wy-nav-content h1 {
  color: #0d9488 !important; /* Deep Teal */
  font-family: "Segoe UI", Arial, sans-serif;
  font-weight: bold;
  border-bottom: 2px solid #0ea5e9 !important; /* Sky Blue Underline */
  padding-bottom: 8px;
  margin-top: 0;
}

.wy-nav-content h2 {
  color: #0ea5e9 !important; /* Sky Blue */
  font-family: "Segoe UI", Arial, sans-serif;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 4px;
}

.wy-nav-content h3 {
  color: #0d9488 !important;
}

/* Download as PDF Button Styling */
.btn-download {
  display: inline-block;
  background-color: #edf2f7;
  color: #0d9488 !important;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  padding: 8px 16px;
  font-weight: bold;
  font-size: 13px;
  margin: 15px 0;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.btn-download:hover {
  background-color: #e2e8f0;
  border-color: #0d9488;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Page-level body logo centering */
.center-logo {
  display: block;
  margin: 1.5em auto;
  width: 150px;
}

/* Theme Toggle Button Styling */
#theme-toggle-link {
  color: #0d9488 !important;
  font-weight: bold;
}

#theme-toggle-link:hover {
  color: #0ea5e9 !important;
}

/* ========================================== */
/* 2. Explicit Light Theme Overrides (Optional)*/
/* ========================================== */
html[data-theme="light"] .wy-side-nav-search a img {
  content: url('../logos/surfcalc_logo_light.png') !important;
}

/* ========================================== */
/* 3. Dark Theme Styles                       */
/* ========================================== */
html[data-theme="dark"] .wy-nav-content-wrap {
  background-color: #16161a !important;
}

html[data-theme="dark"] .wy-nav-content {
  background-color: #16161a !important;
  color: #edf2f7 !important;
}

/* Headings in Dark Mode */
html[data-theme="dark"] .wy-nav-content h1 {
  color: #4da6ff !important; /* Light blue */
  border-bottom: 2px solid #00ffc2 !important; /* Bright cyan/teal underline */
}

html[data-theme="dark"] .wy-nav-content h2 {
  color: #00ffc2 !important; /* Bright cyan/teal */
  border-bottom: 1px solid #2d2d37;
}

html[data-theme="dark"] .wy-nav-content h3 {
  color: #4da6ff !important;
}

/* Breadcrumbs in Dark Mode */
html[data-theme="dark"] .wy-breadcrumbs li {
  color: #a0aec0 !important;
}

html[data-theme="dark"] .wy-breadcrumbs a {
  color: #4da6ff !important;
}

/* Sidebar tweaks in Dark Mode */
html[data-theme="dark"] .wy-side-nav-search {
  background-color: #0f172a !important; /* Deeper slate for top */
}

/* Adapt the logo in the white card to dark mode version */
html[data-theme="dark"] .wy-side-nav-search a img {
  content: url('../logos/surfcalc_logo_dark.png') !important;
}

html[data-theme="dark"] .wy-nav-side {
  background-color: #0e0e11 !important; /* Jet black for bottom */
}

html[data-theme="dark"] .wy-menu-vertical p.caption {
  color: #00ffc2 !important; /* Bright cyan/teal */
  border-bottom: 1px solid #232329;
}

html[data-theme="dark"] .wy-menu-vertical li.current > a {
  color: #00ffc2 !important;
  border-right: 4px solid #00ffc2;
}

/* Code block styling in dark mode */
html[data-theme="dark"] code, 
html[data-theme="dark"] kbd, 
html[data-theme="dark"] pre, 
html[data-theme="dark"] samp {
  background-color: #1f1f2e !important;
  color: #edf2f7 !important;
  border-color: #2d2d37 !important;
}

/* Download as PDF Button in Dark Mode */
html[data-theme="dark"] .btn-download {
  background-color: #24242e;
  color: #00ffc2 !important;
  border: 1px solid #3c3c4a;
}

html[data-theme="dark"] .btn-download:hover {
  background-color: #2d2d3a;
  border-color: #00ffc2;
}

/* Links in Dark Mode Content */
html[data-theme="dark"] .wy-nav-content a {
  color: #4da6ff !important;
}

html[data-theme="dark"] .wy-nav-content a:hover {
  color: #00ffc2 !important;
}

/* Theme Toggle Button Styling in Dark Mode */
html[data-theme="dark"] #theme-toggle-link {
  color: #00ffc2 !important;
}

html[data-theme="dark"] #theme-toggle-link:hover {
  color: #4da6ff !important;
}

/* Image fragment support (#only-light and #only-dark) for ReadTheDocs theme */
html[data-theme="light"] img[src*="#only-dark"],
html:not([data-theme="dark"]) img[src*="#only-dark"] {
  display: none !important;
}

html[data-theme="dark"] img[src*="#only-light"] {
  display: none !important;
}

html[data-theme="dark"] .center-logo img[src*="#only-dark"],
html[data-theme="dark"] img[src*="#only-dark"].center-logo {
  display: block !important;
  margin: 1.5em auto;
}

/* ========================================== */
/* 4. PDF Download Button in Navigation Menu */
/* ========================================== */
.wy-menu-vertical a[href$=".pdf"] {
  background-color: #0d9488 !important; /* Deep Teal */
  color: #ffffff !important;
  font-weight: bold !important;
  text-align: center;
  border-radius: 6px;
  margin: 20px 15px 10px 15px !important;
  padding: 10px 12px !important;
  border: 1px solid #0d9488 !important;
  display: block !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease-in-out;
}

.wy-menu-vertical a[href$=".pdf"]:hover {
  background-color: #0ea5e9 !important; /* SurfCalc Sky Blue on hover */
  border-color: #0ea5e9 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Dark mode overrides for PDF download menu item */
html[data-theme="dark"] .wy-menu-vertical a[href$=".pdf"] {
  background-color: #1e293b !important;
  color: #00ffc2 !important; /* Bright cyan/teal */
  border: 1px solid #00ffc2 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .wy-menu-vertical a[href$=".pdf"]:hover {
  background-color: #00ffc2 !important;
  color: #0e0e11 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 255, 194, 0.2);
}

