/* VPN Exit Controller Custom Styles */

/* Grid cards for feature boxes */
.md-typeset .grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin: 1em 0;
}

.md-typeset .grid.cards > :is(ul, ol) {
  display: contents;
}

.md-typeset .grid.cards > :is(ul, ol) > li,
.md-typeset .grid > .card {
  border: .05rem solid var(--md-default-fg-color--lightest);
  border-radius: .1rem;
  display: block;
  margin: 0;
  padding: .8rem;
  transition: border .25s, box-shadow .25s;
}

.md-typeset .grid.cards > :is(ul, ol) > li:hover,
.md-typeset .grid > .card:hover {
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 0 0 .05rem var(--md-accent-fg-color--transparent);
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.2em 0.6em;
  font-size: 0.875em;
  font-weight: 500;
  border-radius: 0.25rem;
  margin: 0 0.25em;
}

.status-badge.healthy {
  background-color: #10b981;
  color: white;
}

.status-badge.warning {
  background-color: #f59e0b;
  color: white;
}

.status-badge.error {
  background-color: #ef4444;
  color: white;
}

/* API endpoint styling */
.api-endpoint {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: var(--md-code-bg-color);
  border-radius: 0.25rem;
  font-family: var(--md-code-font-family);
}

.api-method {
  font-weight: bold;
  padding: 0.2em 0.5em;
  border-radius: 0.25rem;
  color: white;
  font-size: 0.875em;
}

.api-method.get { background-color: #10b981; }
.api-method.post { background-color: #3b82f6; }
.api-method.put { background-color: #f59e0b; }
.api-method.delete { background-color: #ef4444; }
.api-method.patch { background-color: #8b5cf6; }

/* Country flags */
.country-flag {
  display: inline-block;
  width: 1.5em;
  height: 1em;
  margin-right: 0.5em;
  vertical-align: middle;
  border-radius: 0.1rem;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

/* Terminal/console styling */
.terminal {
  background: #1e1e1e;
  color: #cccccc;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  font-family: 'Roboto Mono', monospace;
  line-height: 1.4;
}

.terminal .prompt {
  color: #10b981;
  user-select: none;
}

.terminal .comment {
  color: #6a9955;
}

/* Feature comparison table */
.comparison-table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
}

.comparison-table th {
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
  padding: 0.75rem;
  text-align: left;
}

.comparison-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

.comparison-table tr:hover {
  background: var(--md-default-fg-color--lightest);
}

/* Performance metrics */
.metric-card {
  background: var(--md-code-bg-color);
  border-radius: 0.5rem;
  padding: 1rem;
  margin: 0.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--md-primary-fg-color);
}

.metric-label {
  color: var(--md-default-fg-color--light);
  font-size: 0.875rem;
}

/* Copy button enhancement */
.md-clipboard {
  transition: color .25s;
}

.md-clipboard:hover {
  color: var(--md-accent-fg-color);
}

/* Announcement banner */
.md-banner {
  background: var(--md-primary-fg-color);
  color: var(--md-primary-bg-color);
}

/* Search highlighting */
.md-search-result mark {
  background-color: var(--md-accent-fg-color--transparent);
  color: var(--md-accent-fg-color);
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  .api-endpoint {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Dark mode adjustments */
[data-md-color-scheme="slate"] {
  .terminal {
    background: #0d1117;
  }
  
  .status-badge.healthy {
    background-color: #065f46;
  }
  
  .status-badge.warning {
    background-color: #92400e;
  }
  
  .status-badge.error {
    background-color: #991b1b;
  }
}

/* Animation for loading states */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Syntax highlighting improvements */
.highlight .k { font-weight: bold; }
.highlight .s { color: #c41a16; }
.highlight .c { color: #6a737d; font-style: italic; }