/* PazGolf Documentation Custom Styles */

:root {
  /* Exact PazGolf brand colors */
  --md-primary-fg-color: #78A5D5;        /* Your exact blue from paz.golf */
  --md-primary-fg-color--light: #9BBEE3; /* 15% lighter */
  --md-primary-fg-color--dark: #5B87BF;  /* 15% darker */
  --md-accent-fg-color: #FF6B35;         /* Orange from CTAs */

  /* Additional brand colors */
  --pazgolf-hero-blue: #78A5D5;
  --pazgolf-dark-section: #2C3E50;
  --pazgolf-text-dark: #333333;
  --pazgolf-text-light: #666666;
}

/* Force the header to use exact brand color */
.md-header {
  background-color: #78A5D5 !important;
}

.md-tabs {
  background-color: #78A5D5 !important;
}

/* Update primary color elements */
.md-typeset a {
  color: #78A5D5;
}

.md-typeset a:hover {
  color: #5B87BF;
}

/* FIX SIDEBAR NAVIGATION READABILITY */
.md-nav__link {
  color: #333333 !important;  /* Dark gray for better contrast */
  font-weight: 400;
}

.md-nav__link:hover,
.md-nav__link:focus {
  color: #5B87BF !important;  /* Darker blue on hover */
  background-color: rgba(120, 165, 213, 0.1);
}

/* Active/current page in sidebar */
.md-nav__link--active {
  color: #5B87BF !important;  /* Darker blue for active */
  font-weight: 600;
}

/* Section headers in sidebar */
.md-nav__title {
  color: #1a1a1a !important;
  font-weight: 600;
}

/* Make the sidebar section currently being viewed more obvious */
.md-nav__item .md-nav__link--active {
  background-color: rgba(120, 165, 213, 0.1);
  border-left: 3px solid #78A5D5;
  padding-left: 0.9rem;
}

/* Improve sidebar hierarchy visibility */
.md-nav--secondary .md-nav__link {
  color: #4a4a4a !important;  /* Slightly lighter for nested items */
}

/* Table of contents on the right - also improve contrast */
.md-nav--secondary .md-nav__title {
  color: #1a1a1a !important;
  font-weight: 600;
}

/* Match landing page typography */
.md-typeset {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333333;
}

/* Headers with brand styling */
.md-typeset h1 {
  font-weight: 700;
  color: #5B87BF;  /* Darker blue for h1 */
  border-bottom: 2px solid rgba(120, 165, 213, 0.2);
  padding-bottom: 0.3em;
}

.md-typeset h2 {
  font-weight: 600;
  color: #78A5D5;  /* Main blue for h2 */
  margin-top: 1.5em;
}

.md-typeset h3 {
  font-weight: 600;
  color: #333333;
}

/* Success/tip boxes in brand blue */
.md-typeset .admonition.success,
.md-typeset details.success {
  border-color: #78A5D5;
}

.md-typeset .success > .admonition-title,
.md-typeset .success > summary {
  background-color: rgba(120, 165, 213, 0.1);
  border-color: #78A5D5;
}

.md-typeset .success > .admonition-title::before,
.md-typeset .success > summary::before {
  background-color: #78A5D5;
}

/* Info admonitions */
.md-typeset .admonition.info,
.md-typeset details.info {
  border-color: #78A5D5;
}

.md-typeset .info > .admonition-title,
.md-typeset .info > summary {
  background-color: rgba(120, 165, 213, 0.1);
  border-color: #78A5D5;
}

/* Tip admonitions */
.md-typeset .admonition.tip,
.md-typeset details.tip,
.md-typeset .admonition.golf-tip,
.md-typeset details.golf-tip {
  border-color: #78A5D5;
}

.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary,
.md-typeset .golf-tip > .admonition-title,
.md-typeset .golf-tip > summary {
  background-color: rgba(120, 165, 213, 0.1);
  border-color: #78A5D5;
}

.md-typeset .golf-tip > .admonition-title::before,
.md-typeset .golf-tip > summary::before {
  content: "⛳";
  margin-right: 0.4rem;
}

/* Winter-specific callout */
.md-typeset .admonition.winter,
.md-typeset details.winter {
  border-color: #78A5D5;
}

.md-typeset .winter > .admonition-title,
.md-typeset .winter > summary {
  background-color: rgba(120, 165, 213, 0.1);
  border-color: #78A5D5;
}

.md-typeset .winter > .admonition-title::before,
.md-typeset .winter > summary::before {
  content: "❄️";
  margin-right: 0.4rem;
}

/* Buttons matching CTA style */
.md-button {
  border-radius: 0.375rem;
  font-weight: 500;
  text-transform: none;
  padding: 0.625rem 1.25rem;
  transition: all 0.2s ease;
}

.md-button--primary {
  background-color: #78A5D5;
  border: 2px solid #78A5D5;
  color: white;
}

.md-button--primary:hover {
  background-color: #5B87BF;
  border-color: #5B87BF;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(120, 165, 213, 0.3);
}

/* Orange accent buttons like "Join Pilot Program" */
.md-button--accent {
  background-color: #FF6B35;
  border: 2px solid #FF6B35;
  color: white;
}

.md-button--accent:hover {
  background-color: #E55A2B;
  border-color: #E55A2B;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

/* Code blocks */
.md-typeset code {
  background-color: rgba(120, 165, 213, 0.1);
  color: #5B87BF;
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  font-size: 0.85em;
}

.md-typeset pre code {
  background-color: #f5f7fa;
  color: #333333;
}

/* Tables matching brand */
.md-typeset table:not([class]) {
  border: 1px solid rgba(120, 165, 213, 0.3);
}

.md-typeset table:not([class]) th {
  background-color: rgba(120, 165, 213, 0.1);
  color: #333333;
  font-weight: 600;
  border-bottom: 2px solid #78A5D5;
}

.md-typeset table:not([class]) td {
  border-top: 1px solid rgba(120, 165, 213, 0.2);
}

/* Search styling */
.md-search__form {
  border-radius: 0.5rem;
}

.md-search__input {
  background-color: rgba(255, 255, 255, 0.9);
  color: #333333;
}

.md-search__input::placeholder {
  color: #999999;
}

/* Footer */
.md-footer {
  background-color: #2C3E50;
}

.md-footer-meta {
  background-color: #1a2633;
}

/* Feature cards */
.feature-card {
  border: 1px solid rgba(120, 165, 213, 0.3);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 1rem 0;
  background: linear-gradient(135deg, rgba(120, 165, 213, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
  transition: all 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(120, 165, 213, 0.15);
  border-color: #78A5D5;
}

.feature-card h3 {
  margin-top: 0;
  color: #5B87BF;
}

/* Responsive images */
.md-typeset img {
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  margin: 1.5em auto;
  display: block;
  max-width: 100%;
}

/* Screenshot annotations */
.screenshot-annotation {
  border: 2px solid #FF6B35;
  border-radius: 0.5rem;
  padding: 0.5rem;
  background-color: rgba(255, 107, 53, 0.05);
}

/* Step numbers for guides */
.step-number {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  line-height: 2rem;
  text-align: center;
  background-color: #78A5D5;
  color: white;
  border-radius: 50%;
  font-weight: bold;
  margin-right: 0.5rem;
}

/* Grid layout for cards */
.md-typeset .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
  .md-typeset .grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    margin: 0.5rem 0;
  }
}

/* Dark mode adjustments for better readability */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #9BBEE3;  /* Lighter blue for dark mode */
  --md-primary-fg-color--light: #B8D4ED;
  --md-primary-fg-color--dark: #78A5D5;
  --md-default-fg-color: #E0E0E0;  /* Light gray text */
  --md-default-bg-color: #1e1e1e;  /* Dark background */
  --md-code-bg-color: #2d2d2d;     /* Code block background */
}

/* Dark mode header - keep your brand blue */
[data-md-color-scheme="slate"] .md-header {
  background-color: #5B87BF !important;
}

[data-md-color-scheme="slate"] .md-tabs {
  background-color: #5B87BF !important;
}

/* Dark mode navigation text */
[data-md-color-scheme="slate"] .md-nav__link {
  color: #E0E0E0 !important;  /* Light gray for readability */
}

[data-md-color-scheme="slate"] .md-nav__link:hover,
[data-md-color-scheme="slate"] .md-nav__link:focus {
  color: #9BBEE3 !important;  /* Light blue on hover */
  background-color: rgba(155, 190, 227, 0.1);
}

[data-md-color-scheme="slate"] .md-nav__link--active {
  color: #9BBEE3 !important;  /* Light blue for active */
}

[data-md-color-scheme="slate"] .md-nav__title {
  color: #F0F0F0 !important;  /* Nearly white for titles */
}

/* Dark mode active sidebar item */
[data-md-color-scheme="slate"] .md-nav__item .md-nav__link--active {
  background-color: rgba(155, 190, 227, 0.15);
  border-left: 3px solid #9BBEE3;
}

/* Dark mode main content text */
[data-md-color-scheme="slate"] .md-typeset {
  color: #E0E0E0;
}

[data-md-color-scheme="slate"] .md-typeset h1 {
  color: #9BBEE3;  /* Light blue for h1 */
  border-bottom: 2px solid rgba(155, 190, 227, 0.3);
}

[data-md-color-scheme="slate"] .md-typeset h2 {
  color: #B8D4ED;  /* Even lighter blue for h2 */
}

[data-md-color-scheme="slate"] .md-typeset h3 {
  color: #F0F0F0;  /* Nearly white for h3 */
}

/* Dark mode links */
[data-md-color-scheme="slate"] .md-typeset a {
  color: #9BBEE3;
}

[data-md-color-scheme="slate"] .md-typeset a:hover {
  color: #B8D4ED;
}

/* Dark mode code blocks */
[data-md-color-scheme="slate"] .md-typeset code {
  background-color: rgba(155, 190, 227, 0.15);
  color: #B8D4ED;
}

[data-md-color-scheme="slate"] .md-typeset pre code {
  background-color: #2d2d2d;
  color: #E0E0E0;
}

/* Dark mode tables */
[data-md-color-scheme="slate"] .md-typeset table:not([class]) {
  border-color: rgba(155, 190, 227, 0.3);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) th {
  background-color: rgba(155, 190, 227, 0.15);
  color: #F0F0F0;
  border-bottom-color: #9BBEE3;
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) td {
  border-top-color: rgba(155, 190, 227, 0.2);
  color: #E0E0E0;
}

/* Dark mode admonitions */
[data-md-color-scheme="slate"] .md-typeset .admonition,
[data-md-color-scheme="slate"] .md-typeset details {
  background-color: rgba(155, 190, 227, 0.05);
  color: #E0E0E0;
}

[data-md-color-scheme="slate"] .md-typeset .success > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .success > summary,
[data-md-color-scheme="slate"] .md-typeset .info > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .info > summary,
[data-md-color-scheme="slate"] .md-typeset .tip > .admonition-title,
[data-md-color-scheme="slate"] .md-typeset .tip > summary {
  background-color: rgba(155, 190, 227, 0.15);
  border-color: #9BBEE3;
  color: #F0F0F0;
}

/* Dark mode buttons */
[data-md-color-scheme="slate"] .md-button--primary {
  background-color: #78A5D5;
  border-color: #78A5D5;
  color: white;
}

[data-md-color-scheme="slate"] .md-button--primary:hover {
  background-color: #9BBEE3;
  border-color: #9BBEE3;
  color: #1e1e1e;
}

/* Dark mode feature cards */
[data-md-color-scheme="slate"] .feature-card {
  border-color: rgba(155, 190, 227, 0.3);
  background: linear-gradient(135deg, rgba(155, 190, 227, 0.1) 0%, rgba(30, 30, 30, 0) 100%);
  color: #E0E0E0;
}

[data-md-color-scheme="slate"] .feature-card:hover {
  border-color: #9BBEE3;
  box-shadow: 0 4px 12px rgba(155, 190, 227, 0.2);
}

[data-md-color-scheme="slate"] .feature-card h3 {
  color: #9BBEE3;
}

/* Focus states for accessibility */
.md-nav__link:focus,
.md-button:focus {
  outline: 2px solid #78A5D5;
  outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #78A5D5;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #5B87BF;
}

/* Dark mode scrollbar */
[data-md-color-scheme="slate"] ::-webkit-scrollbar-track {
  background: #2d2d2d;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
  background: #9BBEE3;
}

[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb:hover {
  background: #B8D4ED;
}

/* Make logo white and bigger */
.md-header__button.md-logo img {
  height: 2.5rem !important;     /* Make it bigger */
  width: auto !important;
  filter: brightness(0) invert(1);  /* Converts to white */
}

/* Even bigger if you want */
.md-header__button.md-logo img {
  height: 3rem !important;     /* Larger size */
  width: auto !important;
  filter: brightness(0) invert(1) drop-shadow(0 0 2px rgba(0,0,0,0.3));  /* White with subtle shadow */
}

/* Placeholder images - show filename when image missing */
.placeholder-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
  border: 2px dashed #78A5D5;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin: 1.5em auto;
  text-align: center;
}

.placeholder-image::before {
  content: "📷";
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.placeholder-path-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.placeholder-filename {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.85rem;
  color: #5B87BF;
  background-color: rgba(120, 165, 213, 0.15);
  padding: 0.4rem 0.8rem;
  border-radius: 0.25rem;
  word-break: break-all;
  user-select: all;  /* Makes text easily selectable */
}

.placeholder-copy-btn {
  background: #78A5D5;
  border: none;
  border-radius: 0.25rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.placeholder-copy-btn:hover {
  background: #5B87BF;
  transform: scale(1.05);
}

.placeholder-copy-btn.copied {
  background: #4CAF50;
}

/* Prevent lightbox activation on placeholders */
.placeholder-image {
  pointer-events: auto;
}

.placeholder-image a {
  pointer-events: none;
}

.placeholder-copy-btn {
  pointer-events: auto;
}

.placeholder-description {
  color: #666;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  font-style: italic;
}

/* GLightbox - Fix scrolling for tall images */
.glightbox-container .gslide-image img {
  max-height: none !important;  /* Remove height constraint */
  object-fit: contain;
}

.glightbox-container .gslide-inner-content {
  overflow-y: auto !important;  /* Enable vertical scrolling */
  max-height: 95vh !important;
}

.glightbox-container .gslide-media {
  max-height: none !important;
}

/* Ensure the slide container allows scrolling */
.glightbox-container .gslide {
  display: flex !important;
  align-items: flex-start !important;  /* Align to top, not center */
  justify-content: center;
  overflow-y: auto !important;
  padding: 20px;
}

/* Make the close button always visible */
.glightbox-container .gclose {
  position: fixed !important;
  top: 20px;
  right: 20px;
  z-index: 9999;
}
