/* =================================================================
 * OmniFetch Documentation - Component Styles
 * Contains cards, buttons, admonitions, tables, and code blocks
 * ================================================================= */

/* =================================================================
 * Enhanced Cards for Home Page
 * ================================================================= */

.md-typeset .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.md-typeset .card {
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.md-typeset .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--md-primary-fg-color);
}

[data-md-color-scheme="slate"] .md-typeset .card {
  background: linear-gradient(145deg, #2d3748, #1a202c);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-md-color-scheme="slate"] .md-typeset .card:hover {
  border-color: var(--md-accent-fg-color);
}

/* =================================================================
 * Service Status Badges
 * ================================================================= */

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 0.5rem;
}

.status-badge.supported {
  background: #E8F5E8;
  color: #2E7D32;
  border: 1px solid #81C784;
}

[data-md-color-scheme="slate"] .status-badge.supported {
  background: rgba(46, 125, 50, 0.2);
  color: #81C784;
}

/* =================================================================
 * Enhanced Admonitions
 * ================================================================= */

.md-typeset .admonition {
  border-radius: 8px;
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin: 1.5rem 0;
}

.md-typeset .admonition.info {
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
  color: #0D47A1;
}

.md-typeset .admonition.info .admonition-title {
  color: #1565C0;
  font-weight: 600;
}

.md-typeset .admonition.info p {
  color: #0D47A1;
}

.md-typeset .admonition.tip {
  background: linear-gradient(135deg, #E8F5E8, #C8E6C9);
  color: #1B5E20;
}

.md-typeset .admonition.tip .admonition-title {
  color: #2E7D32;
  font-weight: 600;
}

.md-typeset .admonition.tip p {
  color: #1B5E20;
  margin: 0.5rem 0;
}

.md-typeset .admonition.warning {
  background: linear-gradient(135deg, #FFF3E0, #FFCC02);
  color: #E65100;
}

.md-typeset .admonition.warning .admonition-title {
  color: #F57C00;
  font-weight: 600;
}

.md-typeset .admonition.warning p {
  color: #E65100;
}

.md-typeset .admonition.note {
  background: linear-gradient(135deg, #F3E5F5, #E1BEE7);
  color: #4A148C;
}

.md-typeset .admonition.note .admonition-title {
  color: #7B1FA2;
  font-weight: 600;
}

.md-typeset .admonition.note p {
  color: #4A148C;
}

[data-md-color-scheme="slate"] .md-typeset .admonition {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

[data-md-color-scheme="slate"] .md-typeset .admonition.tip {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(139, 195, 74, 0.15));
  color: #C8E6C9;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.tip .admonition-title {
  color: #81C784;
}

[data-md-color-scheme="slate"] .md-typeset .admonition.tip p {
  color: #C8E6C9;
}

/* =================================================================
 * Enhanced Buttons and Links
 * ================================================================= */

.md-typeset .md-button {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 0.7rem 1.5rem;
  text-transform: none;
  letter-spacing: 0.5px;
}

.md-typeset .md-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.md-typeset .md-button--primary {
  background: var(--omnifetch-gradient);
  border: none;
}

/* =================================================================
 * Enhanced Code Blocks
 * ================================================================= */

.md-typeset .highlight {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.md-typeset .highlight pre {
  margin: 0;
}

/* =================================================================
 * Table Improvements
 * ================================================================= */

.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  border: none;
  margin: 1.5rem 0;
}

.md-typeset table:not([class]) th {
  background: var(--omnifetch-gradient);
  color: white;
  font-weight: 600;
  padding: 1rem;
  border: none;
}

.md-typeset table:not([class]) td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  vertical-align: middle;
}

.md-typeset table:not([class]) tr:hover {
  background: rgba(57, 73, 171, 0.05);
}

[data-md-color-scheme="slate"] .md-typeset table:not([class]) tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Service logo styling in tables */
.md-typeset table img[src*="logo"] {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Service name alignment */
.md-typeset table td:first-child {
  display: flex;
  align-items: center;
  font-weight: 500;
}

/* =================================================================
 * Status Indicator Badges (App Style Pills)
 * ================================================================= */

.status-indicator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  text-transform: capitalize;
  flex-shrink: 0;
  min-width: 70px;
}

/* Downloaded/Available - Green */
.status-badge.downloaded {
  background: #34C759;
}

/* Downloading - Blue */
.status-badge.downloading {
  background: #007AFF;
}

/* Queued/Pending - Orange */
.status-badge.queued {
  background: #FF9500;
}

/* Missing/Warning - Orange */
.status-badge.missing {
  background: #FF9500;
}

/* Unavailable/Error - Red */
.status-badge.error {
  background: #FF3B30;
}

/* Unmonitored - Gray */
.status-badge.unmonitored {
  background: #8E8E93;
}

/* Wanted - Blue (like in the image) */
.status-badge.wanted {
  background: #007AFF;
}

/* Monitored - Green (like in the image) */
.status-badge.monitored {
  background: #34C759;
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] .status-indicator {
  color: #E5E5E7;
}

/* Status text styling */
.status-text {
  font-weight: 500;
  color: var(--md-default-fg-color);
}

.status-description {
  color: var(--md-default-fg-color--light);
  font-size: 0.85rem;
  margin-left: 0.5rem;
  font-style: italic;
}

[data-md-color-scheme="slate"] .status-description {
  color: #8E8E93;
}

/* =================================================================
 * Icon Enhancements
 * ================================================================= */

.md-typeset h1:before,
.md-typeset h2:before {
  content: "";
  display: inline-block;
  width: 0.8rem;
  height: 0.8rem;
  background: var(--omnifetch-gradient);
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: baseline;
}