/* Digital Memory Chest Documentation Styles */

/* Custom color scheme for memorial theme */
:root {
  --dmc-primary: #673ab7;
  --dmc-primary-light: #9c27b0;
  --dmc-accent: #e1bee7;
  --dmc-background: #faf9fc;
  --dmc-text: #2e2e2e;
  --dmc-border: #e8e8e8;
  --dmc-shadow: rgba(103, 58, 183, 0.1);
}

/* Enhanced grid cards */
.grid.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.grid.cards > div {
  background: linear-gradient(135deg, #faf9fc 0%, #f5f3ff 100%);
  border: 1px solid var(--dmc-border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px var(--dmc-shadow);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.grid.cards > div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--dmc-primary), var(--dmc-primary-light));
}

.grid.cards > div:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--dmc-shadow);
}

/* Enhanced admonitions */
.md-typeset .admonition {
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  margin: 1.5rem 0;
}

.md-typeset .admonition.tip {
  border-color: var(--dmc-primary);
}

.md-typeset .admonition.tip > .admonition-title {
  background-color: rgba(103, 58, 183, 0.1);
}

/* Beautiful buttons */
.md-button {
  background: linear-gradient(135deg, var(--dmc-primary) 0%, var(--dmc-primary-light) 100%);
  color: white !important;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(103, 58, 183, 0.3);
}

.md-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(103, 58, 183, 0.4);
}

.md-button--primary {
  background: linear-gradient(135deg, #673ab7 0%, #9c27b0 100%);
}

/* Code block enhancements */
.md-typeset pre > code {
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Table styling */
.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: none;
}

.md-typeset table:not([class]) th {
  background: linear-gradient(135deg, var(--dmc-primary) 0%, var(--dmc-primary-light) 100%);
  color: white;
  font-weight: 600;
}

.md-typeset table:not([class]) tr:nth-child(even) {
  background-color: rgba(103, 58, 183, 0.03);
}

/* Mermaid diagram styling */
.mermaid {
  background: var(--dmc-background);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Enhanced navigation */
.md-nav__title {
  font-weight: 600;
  color: var(--dmc-primary);
}

.md-nav__item .md-nav__link--active {
  color: var(--dmc-primary);
  font-weight: 500;
}

/* Hero section styling */
.hero-section {
  background: linear-gradient(135deg, #673ab7 0%, #9c27b0 100%);
  color: white;
  padding: 4rem 2rem;
  margin: -2rem -2rem 3rem -2rem;
  border-radius: 0 0 24px 24px;
  text-align: center;
}

.hero-section h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-section p {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* Status indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-indicator.complete {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
}

.status-indicator.processing {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
}

.status-indicator.pending {
  background: rgba(158, 158, 158, 0.1);
  color: #9e9e9e;
}

.status-indicator.failed {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

/* Timeline styling */
.timeline-item {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dmc-primary);
  box-shadow: 0 0 0 4px rgba(103, 58, 183, 0.2);
}

.timeline-item::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1.5rem;
  bottom: -2rem;
  width: 2px;
  background: linear-gradient(180deg, var(--dmc-primary) 0%, transparent 100%);
}

.timeline-item:last-child::after {
  display: none;
}

/* Architecture diagram containers */
.diagram-container {
  position: relative;
  margin: 2rem 0;
}

.diagram-zoom {
  cursor: pointer;
  transition: all 0.3s ease;
}

.diagram-zoom:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* Feature highlights */
.feature-highlight {
  background: linear-gradient(135deg, rgba(103, 58, 183, 0.05) 0%, rgba(156, 39, 176, 0.05) 100%);
  border-left: 4px solid var(--dmc-primary);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
}

.feature-highlight h3 {
  color: var(--dmc-primary);
  margin-top: 0;
}

/* API documentation styling */
.api-method {
  background: rgba(76, 175, 80, 0.1);
  color: #4caf50;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: var(--md-code-font);
  font-size: 0.875rem;
  font-weight: 600;
}

.api-method.post {
  background: rgba(255, 193, 7, 0.1);
  color: #ff6f00;
}

.api-method.delete {
  background: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

.api-method.put {
  background: rgba(103, 58, 183, 0.1);
  color: var(--dmc-primary);
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] {
  --dmc-background: #1a1625;
  --dmc-text: #e0e0e0;
  --dmc-border: #333;
  --dmc-shadow: rgba(103, 58, 183, 0.2);
}

[data-md-color-scheme="slate"] .grid.cards > div {
  background: linear-gradient(135deg, #252033 0%, #2a1f3d 100%);
  border-color: var(--dmc-border);
}

[data-md-color-scheme="slate"] .mermaid {
  background: #1e1b26;
}

[data-md-color-scheme="slate"] .feature-highlight {
  background: linear-gradient(135deg, rgba(103, 58, 183, 0.15) 0%, rgba(156, 39, 176, 0.15) 100%);
}

/* Responsive design */
@media (max-width: 768px) {
  .grid.cards {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    padding: 2rem 1rem;
    margin: -1rem -1rem 2rem -1rem;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
}

/* Print styles */
@media print {
  .md-header,
  .md-sidebar,
  .md-footer {
    display: none;
  }
  
  .md-main__inner {
    margin: 0;
  }
  
  .grid.cards > div {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .grid.cards > div,
  .md-button,
  .diagram-zoom {
    transition: none;
  }
  
  .grid.cards > div:hover,
  .md-button:hover,
  .diagram-zoom:hover {
    transform: none;
  }
}

/* Focus indicators */
.md-button:focus,
.diagram-zoom:focus {
  outline: 2px solid var(--dmc-primary);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .grid.cards > div {
    border-width: 2px;
  }
  
  .status-indicator {
    border: 1px solid currentColor;
  }
}