/**
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/* --- Global Site Preferences --- */

/* Makes the content area wider than standard MkDocs Material */
.md-grid {
  max-width: 80%;
}

/* Optional: Tweak for announcement bar buttons if you use them */
.announce .md-button {
  font-size: 0.8em;
  padding: 0.3em 1em;
  margin-left: 0.5em;
}

/* --- Dark/Light Mode Utilities --- */

/* Hide elements meant for dark mode when in light (default) mode */
[data-md-color-scheme="default"] .dark-mode-only {
  display: none !important;
}

/* Hide elements meant for light mode when in dark (slate) mode */
[data-md-color-scheme="slate"] .light-mode-only {
  display: none !important;
}

/* Version badges for spec pages */
.version-badge {
  display: inline-block;
  padding: 0.25em 0.75em;
  border-radius: 1em;
  font-size: 0.8em;
  font-weight: 600;
  letter-spacing: 0.02em;
  vertical-align: middle;
  margin-left: 0.5em;
}
.version-badge.stable {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.version-badge.draft {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}
.version-badge.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Dark mode overrides */
[data-md-color-scheme="slate"] .version-badge.stable {
  background-color: #1b5e20;
  color: #a5d6a7;
  border-color: #2e7d32;
}
[data-md-color-scheme="slate"] .version-badge.draft {
  background-color: #e65100;
  color: #ffe0b2;
  border-color: #ef6c00;
}
[data-md-color-scheme="slate"] .version-badge.info {
  background-color: #01579b;
  color: #b3e5fc;
  border-color: #0277bd;
}
