/* Taler Documentation Custom Styles - Optimized */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Space Grotesk', sans-serif;
  margin: 0 !important;
  padding: 0 !important;
  background-color: #FAFDFF !important;
  overflow-x: auto !important;
  min-height: 100vh !important;
}

/* Hide default MkDocs content */
.md-content, .md-header, .md-sidebar, .md-nav, .md-search, .md-tabs {
  display: none !important;
}

/* Show our custom content */
.taler-page {
  display: block !important;
  visibility: visible !important;
  position: relative !important;
  z-index: 9999 !important;
  width: 100% !important;
  min-height: 100vh !important;
  background-color: #FAFDFF !important;
  overflow: visible !important;
}

/* Common text styles */
.taler-text-base {
  color: #0D1A35;
  font-family: 'Space Grotesk', sans-serif;
  word-wrap: break-word;
}

.taler-text-white {
  color: white;
  font-family: 'Space Grotesk', sans-serif;
  word-wrap: break-word;
}

/* Common flex utilities */
.taler-flex {
  display: flex !important;
}

.taler-flex-inline {
  display: inline-flex !important;
}

/* Common spacing */
.taler-px-64 {
  padding-left: 64px;
  padding-right: 64px;
}

/* Background colors */
.taler-bg-dark {
  background: #0B152A !important;
}

.taler-bg-light {
  background: #F0F5F9;
}

/* Top Menu */
.taler-top-menu {
  width: 100%;
  height: 100px;
  padding: 0 64px;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1000;
}

.taler-logo {
  justify-content: flex-start;
  align-items: center;
  gap: 14px;
}

.taler-logo-icon {
  width: 52.85px;
  height: 43.53px;
  position: relative;
  border-radius: 8px;
}

.taler-logo-text {
  color: white;
  font-size: 24px;
  font-weight: 600;
  line-height: 33.60px;
}

.taler-search {
  width: 260px;
  padding: 12px 16px;
  border-radius: 50px;
  outline: 1.50px #888888 solid;
  outline-offset: -1.50px;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.taler-search-icon {
  width: 20px;
  height: 20px;
  position: relative;
  overflow: hidden;
  background: white;
  border-radius: 50%;
}

/* Navigation Menu */
.taler-nav {
  width: 100%;
  padding: 24px 64px;
  justify-content: flex-start;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 999;
}

.taler-nav-item {
  padding-top: 10px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  position: relative;
}

.taler-nav-item.active {
  flex-direction: column;
  gap: 10px;
}

.taler-nav-item-text {
  font-size: 16px;
  font-weight: 400;
  line-height: 22.40px;
}

.taler-nav-item.active .taler-nav-item-text {
  border-bottom: 1px solid white;
}

/* Main Content Area */
.taler-main-content {
  width: 100%;
  padding: 0 64px;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 56px;
  min-height: calc(100vh - 200px);
  overflow: visible;
  position: relative;
}

/* Sidebars */
.taler-left-sidebar, .taler-right-sidebar {
  width: 260px;
  padding: 112px 0 160px;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 24px;
}

.taler-sidebar-section {
  align-self: stretch;
  padding: 20px 0 20px 24px;
  border-left: 2px #0D1A35 solid;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

/* Main Content */
.taler-content {
  flex: 1;
  padding: 112px 0 160px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 96px;
  overflow: visible;
  position: relative;
}

/* Typography Scale */
.taler-title {
  align-self: stretch;
  font-size: 48px;
  font-weight: 600;
  line-height: 57.60px;
  margin: 0;
}

.taler-section-title {
  align-self: stretch;
  font-size: 40px;
  font-weight: 600;
  line-height: 48px;
  margin: 0;
}

.taler-subsection-title {
  align-self: stretch;
  font-size: 32px;
  font-weight: 500;
  line-height: 44.80px;
  margin: 0;
}

.taler-feature-title, .taler-step-title {
  align-self: stretch;
  font-size: 24px;
  font-weight: 400;
  line-height: 33.60px;
  margin: 0;
}

/* Lists */
.taler-list {
  align-self: stretch;
  padding-left: 8px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 24px;
  list-style: none;
}

.taler-list-item {
  align-self: stretch;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 4px;
}

.taler-list-bullet {
  height: 28px;
  padding: 0 12px;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
}

.taler-list-bullet::before {
  content: '';
  width: 6px;
  height: 6px;
  background: #0D1A35;
  border-radius: 9999px;
  display: block;
}

.taler-list-content {
  flex: 1;
}

.taler-list-link {
  color: #3177F3;
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
  text-decoration: none;
}

.taler-list-link:hover {
  text-decoration: underline;
}

.taler-list-text {
  font-size: 20px;
  font-weight: 400;
  line-height: 28px;
}

.taler-list-bold {
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

/* Code Blocks */
.taler-code-block {
  align-self: stretch;
  padding: 16px 32px 16px 20px;
  position: relative;
  border-radius: 16px;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 8px;
  z-index: 1;
}

.taler-code-content {
  flex: 1;
  color: #0D1A35;
  font-size: 16px;
  font-family: 'Roboto Mono', monospace;
  font-weight: 400;
  line-height: 25.60px;
}

.taler-code-comment {
  color: #707682;
}

.taler-copy-button {
  position: absolute;
  right: 16px;
  top: 16px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
  z-index: 100;
  overflow: visible;
}

.taler-copy-button:hover {
  transform: scale(1.1);
}

.taler-copy-icon {
  width: 20px;
  height: 20px;
  background: #707682;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>') no-repeat 50% 50%;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>') no-repeat 50% 50%;
  mask-size: cover;
}

.taler-copy-tooltip {
  position: absolute;
  top: -36px;
  right: 0;
  display: none;
  white-space: nowrap;
  z-index: 10000 !important;
  pointer-events: none;
}

.taler-copy-tooltip.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Ensure tooltip container doesn't clip */
.taler-code-block,
.taler-content,
.taler-main-content,
.taler-page {
  overflow: visible !important;
}

.taler-copy-tooltip-content {
  padding: 8px 12px;
  background: #303038;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 10001;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.taler-copy-tooltip-text {
  color: white;
  font-size: 14px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  line-height: 20px;
}

/* CTA Button */
.taler-cta-button {
  padding: 20px 40px;
  border-radius: 50px;
  border: 2px #E9EFF3 solid;
  justify-content: flex-start;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.taler-cta-button:hover {
  background-color: #E9EFF3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.taler-cta-text {
  font-size: 16px;
  font-weight: 400;
  line-height: 22.40px;
}

/* Table of Contents */
.taler-toc {
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

.taler-toc-title {
  align-self: stretch;
  padding: 20px 24px;
  color: #707682;
  font-size: 16px;
  font-weight: 400;
  line-height: 22.40px;
}

.taler-toc-item {
  align-self: stretch;
  padding: 20px 0 20px 24px;
  border-left: 1px #E9EFF3 solid;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.taler-toc-item:hover {
  background-color: #f5f5f5;
}

.taler-toc-item.active {
  border-left: 2px #0D1A35 solid;
  background-color: #f8fafc;
}

.taler-toc-item.indent {
  padding-left: 32px;
}

.taler-toc-item-text {
  flex: 1;
  font-size: 16px;
  font-weight: 400;
  line-height: 22.40px;
}

.taler-toc-scrollbar {
  width: 4px;
  height: 267px;
  background: #AEBDC8;
  border-radius: 8px;
}

/* Footer */
.taler-footer {
  width: 100%;
  padding: 144px 64px 112px;
  position: relative;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 160px;
  overflow: hidden;
}

.taler-footer-content {
  align-self: stretch;
  justify-content: space-between;
  align-items: flex-end;
}

.taler-footer-text {
  width: 644px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 24px;
}

.taler-footer-description {
  align-self: stretch;
  font-size: 32px;
  font-weight: 400;
  line-height: 44.80px;
  margin: 0;
}

.taler-footer-links {
  width: 310px;
  height: 287px;
  padding-top: 6px;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 40px;
}

.taler-footer-column {
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 16px;
}

.taler-footer-column-title {
  align-self: stretch;
  height: 38px;
  color: #707682;
  font-size: 16px;
  font-weight: 400;
  line-height: 22.40px;
}

.taler-footer-link {
  align-self: stretch;
  font-size: 16px;
  font-weight: 400;
  line-height: 22.40px;
  cursor: pointer;
  text-decoration: none;
}

.taler-footer-link:hover {
  opacity: 0.8;
}

.taler-footer-bottom {
  align-self: stretch;
  justify-content: space-between;
  align-items: center;
}

.taler-footer-email, .taler-footer-copyright {
  width: 533px;
  font-size: 16px;
  font-weight: 400;
  line-height: 22.40px;
}

.taler-footer-copyright {
  text-align: right;
}

.taler-footer-logo {
  width: 57px;
  height: 57px;
  left: 51px;
  top: 125px;
  position: absolute;
  border-radius: 8px;
}

/* Apply base text colors */
.taler-text-base,
.taler-title,
.taler-section-title,
.taler-subsection-title,
.taler-feature-title,
.taler-step-title,
.taler-list-text,
.taler-list-bold,
.taler-toc-item-text,
.taler-cta-text {
  color: #0D1A35;
}

.taler-text-white,
.taler-logo-text,
.taler-search-text,
.taler-nav-item-text,
.taler-footer-description,
.taler-footer-link,
.taler-footer-email,
.taler-footer-copyright {
  color: white;
}

/* Apply background colors */
.taler-top-menu, .taler-nav, .taler-footer {
  background: #0B152A !important;
}

.taler-code-block, .taler-bg-light {
  background: #F0F5F9;
}

/* Apply flex displays */
.taler-top-menu, .taler-logo, .taler-search, .taler-nav, 
.taler-main-content, .taler-left-sidebar, .taler-right-sidebar,
.taler-content, .taler-list, .taler-list-item, .taler-code-block,
.taler-cta-button, .taler-toc, .taler-footer, .taler-footer-content,
.taler-footer-text, .taler-footer-links, .taler-footer-column,
.taler-footer-bottom {
  display: flex !important;
}

.taler-left-sidebar-content, .taler-sidebar-section, .taler-toc-item {
  display: inline-flex;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .taler-main-content {
    flex-direction: column;
    gap: 40px;
  }
  
  .taler-left-sidebar, .taler-right-sidebar {
    width: 100%;
    padding: 40px 0;
  }
  
  .taler-content {
    padding: 0 0 40px 0;
  }
}

@media (max-width: 768px) {
  .taler-px-64, .taler-top-menu, .taler-nav, .taler-main-content, .taler-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  
  .taler-title {
    font-size: 36px;
    line-height: 43.2px;
  }
  
  .taler-section-title {
    font-size: 32px;
    line-height: 38.4px;
  }
}