/* Wayfarer Mobile Documentation Theme
   Based on app color: #E55A4E (coral red)
   Complementary colors derived from brand palette
*/

:root {
  /* Primary brand colors from app icon */
  --wf-accent: #E55A4E;      /* Coral red - primary action/highlight */
  --wf-primary: #2D3E50;     /* Dark slate - headings/links */
  --wf-secondary: #F8A99E;   /* Light coral - subtle accents */

  /* Neutral colors */
  --wf-text: #333333;        /* Body text */
  --wf-text-light: #666666;  /* Secondary text */
  --wf-bg: #FAFBFC;          /* Page background */
  --wf-white: #FFFFFF;       /* Cards/content */
  --wf-border: #E1E4E8;      /* Borders */

  /* Status colors */
  --wf-success: #28A745;
  --wf-warning: #FFC107;
  --wf-error: #DC3545;
  --wf-info: #17A2B8;
}

/* Layout & base */
body {
  background: var(--wf-bg);
  color: var(--wf-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.content {
  background: var(--wf-white);
}

/* App name (top of sidebar) */
.app-name,
.app-name-link {
  color: var(--wf-accent) !important;
  font-weight: 700 !important;
  font-size: 1.2rem !important;
}

/* Sidebar */
.sidebar {
  background: var(--wf-white);
  border-right: 1px solid var(--wf-border);
}

.sidebar ul li a {
  color: var(--wf-text);
  font-weight: 400;
  transition: color 0.2s ease;
}

.sidebar ul li a:hover {
  color: var(--wf-accent);
  text-decoration: none;
}

.sidebar ul li.active > a {
  color: var(--wf-accent) !important;
  font-weight: 600;
  border-right: 3px solid var(--wf-accent);
}

.sidebar-nav > ul > li > a {
  font-weight: 600;
  color: var(--wf-primary);
}

/* Headings */
.markdown-section h1 {
  color: var(--wf-accent);
  border-bottom: 2px solid var(--wf-accent);
  padding-bottom: 0.5rem;
}

.markdown-section h2 {
  color: var(--wf-primary);
  border-bottom: 1px solid var(--wf-border);
  padding-bottom: 0.3rem;
}

.markdown-section h3,
.markdown-section h4,
.markdown-section h5,
.markdown-section h6 {
  color: var(--wf-primary);
}

/* Links in content */
.markdown-section a {
  color: var(--wf-accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--wf-secondary);
}

.markdown-section a:hover {
  color: var(--wf-primary);
  border-bottom-color: var(--wf-primary);
}

/* Code blocks & inline code */
.markdown-section code {
  background: #F6F8FA;
  color: var(--wf-text);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

.markdown-section pre {
  background: #F6F8FA;
  border-radius: 6px;
  border-left: 4px solid var(--wf-accent);
}

.markdown-section pre > code {
  background: transparent;
  padding: 0;
}

/* Tables */
.markdown-section table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0;
}

.markdown-section table thead th {
  background: var(--wf-accent);
  color: var(--wf-white);
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
}

.markdown-section table tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--wf-border);
}

.markdown-section table tbody tr:hover {
  background: #FEF6F5;
}

/* Blockquotes */
.markdown-section blockquote {
  border-left: 4px solid var(--wf-accent);
  background: #FEF6F5;
  padding: 1rem;
  margin: 1rem 0;
  color: var(--wf-text);
}

.markdown-section blockquote p {
  margin: 0;
}

/* Tip/Warning boxes */
.markdown-section .tip {
  background: #E8F5E9;
  border-left-color: var(--wf-success);
}

.markdown-section .warn {
  background: #FFF8E1;
  border-left-color: var(--wf-warning);
}

/* Search */
.search input {
  border: 2px solid var(--wf-border) !important;
  border-radius: 6px !important;
  padding: 0.5rem !important;
}

.search input:focus {
  border-color: var(--wf-accent) !important;
  box-shadow: 0 0 0 3px rgba(229, 90, 78, 0.2) !important;
}

.search .matching-post {
  border-bottom: 1px solid var(--wf-border);
}

.search .matching-post .search-keyword {
  background: var(--wf-secondary);
  color: var(--wf-text);
}

/* GitHub corner */
.github-corner svg {
  fill: var(--wf-accent) !important;
  color: var(--wf-white) !important;
}

/* Pagination */
.pagination-item-title {
  color: var(--wf-accent) !important;
}

/* Cover page (if used) */
.cover {
  background: linear-gradient(135deg, var(--wf-accent) 0%, #C94A40 100%) !important;
}

.cover h1 {
  color: var(--wf-white) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar {
    background: var(--wf-white);
  }

  .markdown-section {
    padding: 1rem;
  }
}

/* Feature badges */
.badge {
  display: inline-block;
  padding: 0.2em 0.6em;
  font-size: 0.75em;
  font-weight: 600;
  border-radius: 20px;
  margin-left: 0.5em;
}

.badge-new {
  background: var(--wf-success);
  color: white;
}

.badge-beta {
  background: var(--wf-warning);
  color: var(--wf-text);
}

.badge-android {
  background: #3DDC84;
  color: white;
}

.badge-ios {
  background: #007AFF;
  color: white;
}

/* Platform icons */
.platform-icons {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.platform-icon {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9em;
  font-weight: 500;
}

/* Screenshot images - limit height for tall screenshots */
.markdown-section img {
  max-height: 600px;
  width: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: zoom-in;
  transition: box-shadow 0.2s ease;
}

.markdown-section img:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Hint that images are clickable */
.markdown-section p > img::after {
  content: "Click to enlarge";
}

/* Medium-zoom overlay background */
.medium-zoom-overlay {
  background: rgba(0, 0, 0, 0.9) !important;
}

/* Zoomed image styling */
.medium-zoom-image--opened {
  max-height: none !important;
  border-radius: 0;
}
