/* ========================================
   Callout Components (GitHub-style)
   Inspired by Hextra documentation
   Includes: info, tip, warning, important, danger
   ======================================== */

.callout {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
  border-radius: 6px;
  transition: all 0.3s ease;
  align-items: flex-start;
  line-height: 1.6;
}

.callout-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  margin-top: 0.125rem;
}

.callout-icon svg {
  width: 20px;
  height: 20px;
}

.callout-content {
  flex: 1;
  min-width: 0;
}

.callout-content > *:first-child {
  margin-top: 0;
}

.callout-content > *:last-child {
  margin-bottom: 0;
}

.callout-heading {
  font-weight: 600;
  font-size: 1.05em;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.callout-content p {
  margin: 0.5rem 0;
}

.callout-content code {
  background-color: rgba(0, 0, 0, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Note Callout - Blue (Info) */
.callout-note {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: var(--text-primary);
}

.callout-note .callout-icon {
  color: #3b82f6;
}

.callout-note .callout-content code {
  background-color: rgba(59, 130, 246, 0.15);
}

/* Tip Callout - Green */
.callout-tip {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: var(--text-primary);
}

.callout-tip .callout-icon {
  color: #10b981;
}

.callout-tip .callout-content code {
  background-color: rgba(16, 185, 129, 0.15);
}

/* Important Callout - Purple */
.callout-important {
  background-color: rgba(168, 85, 247, 0.1);
  border-color: #a855f7;
  color: var(--text-primary);
}

.callout-important .callout-icon {
  color: #a855f7;
}

.callout-important .callout-content code {
  background-color: rgba(168, 85, 247, 0.15);
}

/* Warning Callout - Yellow/Orange */
.callout-warning {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: var(--text-primary);
}

.callout-warning .callout-icon {
  color: #f59e0b;
}

.callout-warning .callout-content code {
  background-color: rgba(245, 158, 11, 0.15);
}

/* Danger Callout - Red */
.callout-danger {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: var(--text-primary);
}

.callout-danger .callout-icon {
  color: #ef4444;
}

.callout-danger .callout-content code {
  background-color: rgba(239, 68, 68, 0.15);
}

/* Light theme adjustments */
html.light-theme .callout-content code {
  background-color: rgba(0, 0, 0, 0.05);
}

html.light-theme .callout-note .callout-content code {
  background-color: rgba(59, 130, 246, 0.1);
}

html.light-theme .callout-tip .callout-content code {
  background-color: rgba(16, 185, 129, 0.1);
}

html.light-theme .callout-important .callout-content code {
  background-color: rgba(168, 85, 247, 0.1);
}

html.light-theme .callout-warning .callout-content code {
  background-color: rgba(245, 158, 11, 0.1);
}

html.light-theme .callout-danger .callout-content code {
  background-color: rgba(239, 68, 68, 0.1);
}

/* ============================================
   Responsive Design
   ============================================ */

/* Medium screens and below - Tablets (< 768px) */
@media (max-width: 767px) {
    .callout {
        padding: 0.875rem;
        gap: 0.75rem;
        font-size: 0.9375rem;
    }
    
    .callout-heading {
        font-size: 1rem;
    }
}

/* Mobile portrait (< 576px) */
@media (max-width: 575px) {
    .callout {
        padding: 0.75rem;
        gap: 0.625rem;
        font-size: 0.875rem;
        margin: 1rem 0;
    }
    
    .callout-icon {
        width: 18px;
        height: 18px;
    }
    
    .callout-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .callout-heading {
        font-size: 0.9375rem;
    }
}

/* Print styles */
@media print {
  .callout {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}
