/* Ecue Documentation - Brand-Aligned Styles */

/* ============================================
   CSS Variables (Ecue Brand)
   ============================================ */
:root {
  /* Brand colors */
  --brand-primary: #e17b74;
  --brand-accent: #7b9eb1;
  --brand-background: #fbf9f4;
  --brand-text: #574a42;
  --brand-text-light: hsl(23, 14%, 45%);
  --brand-border: rgba(107, 93, 84, 0.15);
  --brand-hover-bg: #f2f0ea;
  
  /* Utility colors */
  --white: #ffffff;
  --gray-light: #f5f5f5;
  
  /* Status colors */
  --success: #48c78e;
  --warning: #f7b731;
  --danger: #e17b74;
  
  /* Brand radius */
  --brand-radius: 6px;
}

/* ============================================
   Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Avenir', 'Helvetica', 'Arial', sans-serif;
  color: var(--brand-text);
  background-color: var(--brand-background);
  line-height: 1.6;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Avenir', 'Helvetica', 'Arial', sans-serif;
  font-weight: 700;
  color: var(--brand-text);
  line-height: 1.25;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; margin-top: 2rem; }
h3 { font-size: 1.5rem; margin-top: 1.5rem; }
h4 { font-size: 1.25rem; margin-top: 1rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--brand-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

strong {
  font-weight: 700;
}

/* ============================================
   Code Blocks (Brand Style)
   ============================================ */
code {
  display: inline;
  padding: 0.125rem 0.375rem;
  font-size: 0.875em;
  background-color: var(--brand-text);
  color: var(--brand-background);
  border-radius: 3px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: 'Courier New', Courier, monospace;
}

pre {
  background-color: var(--brand-text);
  color: var(--brand-background);
  padding: 1rem;
  border-radius: var(--brand-radius);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

pre code {
  background-color: transparent;
  padding: 0;
  border-radius: 0;
  white-space: pre-wrap;
}

/* ============================================
   Lists
   ============================================ */
ul {
  list-style-type: disc;
  list-style-position: outside;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

ol {
  list-style-type: decimal;
  list-style-position: outside;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

li {
  margin-bottom: 0.5rem;
}

/* ============================================
   Tables
   ============================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  background: var(--white);
  border: 1px solid var(--brand-border);
  border-radius: var(--brand-radius);
  overflow: hidden;
}

table th,
table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--brand-border);
}

table th {
  background: var(--brand-text);
  color: var(--brand-background);
  font-weight: 700;
}

table tr:last-child td {
  border-bottom: none;
}

table tr:nth-child(even) {
  background: rgba(87, 74, 66, 0.03);
}

/* ============================================
   Horizontal Rule
   ============================================ */
hr {
  border: none;
  border-top: 1px solid var(--brand-border);
  margin: 2rem 0;
}

/* ============================================
   Header Navigation
   ============================================ */
.docs-header {
  background: var(--white);
  border-bottom: 1px solid var(--brand-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.logo-link img {
  height: 32px;
  width: auto;
}

.logo-text {
  font-family: 'Avenir', 'Helvetica', 'Arial', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-text);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-menu a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--brand-text);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--brand-primary);
  text-decoration: none;
}

.nav-menu a.active {
  color: var(--brand-primary);
  font-weight: 600;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--brand-text);
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
  }

  table th,
  table td {
    padding: 0.5rem;
    font-size: 0.875rem;
    word-break: break-word;
  }

  ul,
  ol {
    margin-left: 1rem;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--brand-border);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }
  
  .nav-menu.is-active {
    display: flex;
  }
  
  .nav-menu a {
    padding: 0.75rem 1rem;
    width: 100%;
    border-radius: var(--brand-radius);
  }
  
  .nav-menu a:hover {
    background: var(--brand-hover-bg);
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .header-container {
    position: relative;
  }
}

/* ============================================
   Main Content
   ============================================ */
.docs-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

@media (max-width: 768px) {
  .docs-container {
    padding: 2rem 1rem;
  }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--brand-text);
}

.hero p {
  font-size: 1.25rem;
  color: var(--brand-text-light);
  max-width: 700px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
}

/* ============================================
   Cards Grid
   ============================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--brand-radius);
  border: 1px solid var(--brand-border);
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  margin-top: 0;
  color: var(--brand-text);
}

.card p {
  color: var(--brand-text-light);
  margin-bottom: 0;
  font-size: 0.9375rem;
}

/* ============================================
   Callouts (Message Boxes)
   ============================================ */
.callout {
  padding: 1rem 1.5rem;
  border-radius: var(--brand-radius);
  margin-bottom: 1.5rem;
  border-left: 4px solid;
  background: var(--white);
}

.callout.is-info {
  border-color: var(--brand-accent);
  background: rgba(123, 158, 177, 0.1);
}

.callout.is-warning {
  border-color: var(--warning);
  background: rgba(247, 183, 49, 0.1);
}

.callout.is-danger {
  border-color: var(--danger);
  background: rgba(225, 123, 116, 0.1);
}

.callout.is-success {
  border-color: var(--success);
  background: rgba(72, 199, 142, 0.1);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ============================================
   API Endpoint Boxes
   ============================================ */
.api-endpoint {
  background: var(--white);
  border: 1px solid var(--brand-border);
  border-radius: var(--brand-radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.method {
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--brand-radius);
  text-transform: uppercase;
}

.method.post {
  background: var(--success);
  color: var(--white);
}

.method.get {
  background: var(--brand-accent);
  color: var(--white);
}

.method.put {
  background: var(--warning);
  color: var(--white);
}

.method.delete {
  background: var(--danger);
  color: var(--white);
}

.path {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1rem;
  color: var(--brand-text);
  word-break: break-all;
}

.endpoint-description {
  color: var(--brand-text-light);
  margin-bottom: 1rem;
}

/* ============================================
   Breadcrumbs
   ============================================ */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--brand-text-light);
}

.breadcrumbs a {
  color: var(--brand-primary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs .separator {
  color: var(--brand-border);
}

/* ============================================
   Footer
   ============================================ */
.docs-footer {
  background: var(--white);
  border-top: 1px solid var(--brand-border);
  padding: 2rem;
  margin-top: 4rem;
  text-align: center;
  color: var(--brand-text-light);
  font-size: 0.875rem;
}

.docs-footer p {
  margin-bottom: 0.5rem;
}

.docs-footer a {
  color: var(--brand-primary);
  margin: 0 0.5rem;
}

/* ============================================
   Content Styling Helpers
   ============================================ */
.content-section {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--brand-radius);
  border: 1px solid var(--brand-border);
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ============================================
   Utility Classes
   ============================================ */
.text-muted {
  color: var(--brand-text-light);
}

.text-center {
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 0.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
