/**
 * Copyright 2025 AGNTCY Contributors (https://github.com/agntcy)
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * Any CSS included here will be global. The classic template
 * bundles Infima by default. Infima is a CSS framework designed to
 * work well for content-centric websites.
 */

/* You can override the default Infima variables here. */
:root {
  --ifm-color-primary: #002786; /* Updated primary color */
  --ifm-color-primary-dark: #001f6b;
  --ifm-color-primary-darker: #001a57;
  --ifm-color-primary-darkest: #001342;
  --ifm-color-primary-light: #0033a1;
  --ifm-color-primary-lighter: #003dbb;
  --ifm-color-primary-lightest: #0046d5;
  --ifm-code-font-size: 95%;
  --docusaurus-highlighted-code-line-bg: rgba(0, 39, 134, 0.1); /* Updated highlight background */
}

/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
  --ifm-color-primary: #FBAF45; /* Dark theme primary color */
  --ifm-color-primary-dark: #002786; /* Matches light theme primary */
  --ifm-color-primary-darker: #001f6b;
  --ifm-color-primary-darkest: #001342;
  --ifm-color-primary-light: #0046d5;
  --ifm-color-primary-lighter: #0051af;
  --ifm-color-primary-lightest: #0066ff;
  --docusaurus-highlighted-code-line-bg: rgba(0, 39, 134, 0.2); /* Highlight background for dark theme */
}

.navbar {
  position: fixed; /* Fix the sidebar position */
  top: 0;
  left: 0;
  width: 100%; /* Fixed width */
  background-color: #E8EEFB; /* Keep the existing background */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background: radial-gradient(100% 204.08% at 0% 100%, #DEE6F9 0%, #F5F8FD 48.71%, #F5F8FD 100%);
  z-index: 1000; /* Ensure it stays on top */
}

[data-theme='dark'] .navbar {
  background: radial-gradient(100% 204.08% at 0% 100%, #00142B 0%, #00142B 48.71%, #00142B 100%);
}

.footer {
  background-color: #E8EEFB;
  border-top: 1px solid #dee6f9;
}

[data-theme='dark'] .footer {
  background-color: #00142B;
  border-top: 1px solid #002a4d;
}

.theme-doc-sidebar-container {
  background-color: #E8EEFB;
  border-right: 1px solid #dee6f9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

[data-theme='dark'] .theme-doc-sidebar-container {
  background-color: #00142b;
  border-right: 1px solid #002a4d;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.theme-doc-sidebar-container div[class^='sidebarViewport'] {
  height: auto;
}

.menu__link {
  font-size: 16px;
  color: #00142B; 
}
.menu__link:hover {
  font-size: 16px;
  color: #0051AF; 
}

.menu__link--active {
  font-weight: bold;
  color: #0051AF;
}

[data-theme='dark'] .menu__link {
  color: #dee6f9;
}

[data-theme='dark'] .menu__link:hover {
  color: #FBAF45;
}

[data-theme='dark'] .menu__link--active {
  color: #FBAF45;
}

.main-wrapper {
  margin-top: 60px; /* Adjust for fixed navbar */
  background-color: #EFF3FC;
}

[data-theme='dark'] .main-wrapper {
  background-color: #00142B;
}

.card {
  background-color: #EFF3FC;
  border: 1px solid #dee6f9;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  color: #00142B;
  padding: 16px;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

[data-theme='dark'] .card {
  background-color: #00142B;
  border: 1px solid #002a4d;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  color: #dee6f9;
}

[data-theme='dark'] .card:hover {
  transform: translateY(-4px); 
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.7);
}

code {
  background-color: #EFF3FC;
  color: #00142B;
  border-radius: 4px;
}

[data-theme='dark'] code {
  background-color: #002a4d;
  color: #dee6f9;
  border-radius: 4px;
}

.hero {
 background-color: #EFF3FC;
}

[data-theme='dark'] .hero {
  background-color: #00142B;
}

.hero__title {
  color: #00142B;
}

[data-theme='dark'] .hero__title {
  color: #FBAF45;
}

.hero__subtitle {
  color: #00142B;
}

[data-theme='dark'] .hero__subtitle {
  color: #FBAF45;
}

html[data-theme="light"] body, html[data-theme="light"] .scalar-card.dark-mode {
  --scalar-background-1: #E8EEFB !important;
  --scalar-background-2: #EFF3FC !important;
  --scalar-background-3: #C8D5F554 !important;
}

html[data-theme="dark"] body, .scalar-card.dark-mode {
  --scalar-background-1: #00142B !important;
  --scalar-background-2: #041930 !important;
  --scalar-background-3: #0D274D !important;
}

.panzoom-wrapper {
  border: 1px solid var(--ifm-color-emphasis-300);
  border-radius: 8px;
  width: 100%;
  position: relative;
}

.panzoom-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 6px;
}

.panzoom-controls-modal {
  position: sticky !important;
  width: fit-content;
  left: 100vw;
}

.button-control {
  padding-left: 8px !important;
  padding-right: 8px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme='dark'] .panzoom-wrapper {
  border: 1px solid var(--ifm-color-emphasis-300);
}

.markdown > *:last-child {
  width: 100% !important;
}

.panzoom-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  gap: 6px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal-body {
  position: relative;
  background-color: #E8EEFB;
  margin: auto;
  padding: 12px;
  border: 1px solid #888;
  border-radius: 8px;
  width: 80%;
  max-height: calc(100vh - 5% - 100px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-top: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

[data-theme='dark'] .modal-body {
  background-color: #00142B;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.modal-content {
  margin-top: 40px;
}

.close-modal-button {
  color: black;
}

[data-theme='dark'] .close-modal-button {
  color: white;
}

.close-modal-button:hover,
.close-modal-button:focus {
  color: #003dbb;
  text-decoration: none;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden !important;
}

.modal-header {
  background-color: #E8EEFB;
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  border-bottom: 1px solid #ddd; 
  padding-top: 12px;
  height: 50px;
}

[data-theme='dark'] .modal-header {
  background-color: #00142B;
}

.algolia-docsearch-suggestion--category-header {
  background-color: #002786 !important;
}

.algolia-docsearch-suggestion--no-results {
  background-color: #002786 !important;
}
