/* ===========================
   Atys Developers - Docs CSS
   =========================== */

:root {
  --docs-primary: #4f46e5;
  --docs-success: #22c55e;
  --docs-warning: #f59e0b;
  --docs-info: #3b82f6;
  --docs-purple: #8b5cf6;
  --docs-danger: #ef4444;
  --docs-bg: #ffffff;
  --docs-bg-secondary: #f8fafc;
  --docs-text: #0f172a;
  --docs-text-muted: #64748b;
  --docs-border: #e2e8f0;
  --docs-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --docs-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body.dark-mode {
  --docs-bg: #0f172a;
  --docs-bg-secondary: #1e293b;
  --docs-text: #f8fafc;
  --docs-text-muted: #94a3b8;
  --docs-border: #334155;
}

/* ===========================
   Header
   =========================== */

.docs-header {
  background: var(--docs-bg);
  border-bottom: 1px solid var(--docs-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.docs-header .navbar-brand {
  font-size: 1.25rem;
  transition: opacity 0.2s;
}

.docs-header .navbar-brand:hover {
  opacity: 0.8;
}

.docs-header .nav-link {
  color: var(--docs-text);
  font-weight: 500;
  padding: 0.5rem 1rem;
  transition: color 0.2s;
}

.docs-header .nav-link:hover,
.docs-header .nav-link.active {
  color: var(--docs-primary);
}

/* ===========================
   Hero Section
   =========================== */

.hero-docs {
  padding: 3rem 0 2rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(34, 197, 94, 0.05) 100%);
}

.hero-docs h1 {
  color: var(--docs-text);
  line-height: 1.2;
}

.hero-docs .lead {
  font-size: 1.25rem;
  color: var(--docs-text-muted);
}

/* Search Box */
.search-box {
  max-width: 500px;
}

.search-box .input-group-text {
  border-right: 0;
}

.search-box .form-control {
  border-left: 0;
}

.search-box .form-control:focus {
  border-color: #ced4da;
  box-shadow: none;
}

/* Stats Inline */
.stats-inline {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--docs-border);
}

.stat-inline {
  display: flex;
  flex-direction: column;
}

.stat-inline strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--docs-primary);
  line-height: 1;
}

.stat-inline span {
  font-size: 0.875rem;
  color: var(--docs-text-muted);
  margin-top: 0.25rem;
}

/* ===========================
   Code Preview
   =========================== */

.code-preview {
  background: #1e293b;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--docs-shadow-lg);
  margin-top: 1rem;
}

.code-header {
  background: #0f172a;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid #334155;
}

.code-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #475569;
}

.code-dot:nth-child(1) {
  background: #ef4444;
}

.code-dot:nth-child(2) {
  background: #f59e0b;
}

.code-dot:nth-child(3) {
  background: #22c55e;
}

.code-title {
  color: #94a3b8;
  font-size: 0.875rem;
  margin-left: auto;
}

.code-body {
  padding: 1.5rem;
  overflow-x: auto;
}

.code-body pre {
  margin: 0;
  color: #e2e8f0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

.code-body code {
  color: inherit;
  background: none;
  padding: 0;
}

/* ===========================
   Documentation Cards
   =========================== */

.card-docs {
  display: block;
  background: var(--docs-bg);
  border: 1px solid var(--docs-border);
  border-radius: 1rem;
  padding: 1.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: var(--docs-shadow);
}

.card-docs:hover {
  transform: translateY(-4px);
  box-shadow: var(--docs-shadow-lg);
  border-color: var(--docs-primary);
}

.card-docs-icon {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: white;
}

.card-docs-icon.bg-primary {
  background: var(--docs-primary);
}

.card-docs-icon.bg-success {
  background: var(--docs-success);
}

.card-docs-icon.bg-warning {
  background: var(--docs-warning);
}

.card-docs-icon.bg-info {
  background: var(--docs-info);
}

.card-docs-icon.bg-purple {
  background: var(--docs-purple);
}

.card-docs-icon.bg-danger {
  background: var(--docs-danger);
}

.card-docs-icon.bg-secondary {
  background: #64748b;
}

.card-docs-icon.bg-dark {
  background: #0f172a;
}

.card-docs h3 {
  color: var(--docs-text);
  margin-bottom: 0.5rem;
}

.card-docs p {
  color: var(--docs-text-muted);
  font-size: 0.875rem;
  margin-bottom: 0;
}

/* ===========================
   Timeline
   =========================== */

.timeline-docs {
  position: relative;
  padding-left: 2.5rem;
}

.timeline-docs::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--docs-primary), var(--docs-success));
}

.timeline-docs-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-docs-number {
  position: absolute;
  left: -2.5rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--docs-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  z-index: 1;
}

.timeline-docs-content h3 {
  color: var(--docs-text);
  margin-bottom: 0.5rem;
}

.timeline-docs-content p {
  color: var(--docs-text-muted);
  margin-bottom: 0;
}

/* ===========================
   Endpoint Cards
   =========================== */

.endpoint-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--docs-bg);
  border: 1px solid var(--docs-border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: all 0.2s ease;
  text-decoration: none;
}

.endpoint-card:hover {
  border-color: var(--docs-primary);
  box-shadow: var(--docs-shadow);
}

.endpoint-method {
  flex-shrink: 0;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.endpoint-method.get {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.endpoint-method.post {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.endpoint-method.put {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.endpoint-method.patch {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.endpoint-method.delete {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.endpoint-info {
  flex: 1;
}

.endpoint-info h4 {
  color: var(--docs-text);
  font-family: 'Monaco', 'Menlo', monospace;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.endpoint-info p {
  color: var(--docs-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.endpoint-link {
  color: var(--docs-text-muted);
  font-size: 1.5rem;
  text-decoration: none;
  transition: color 0.2s;
}

.endpoint-link:hover {
  color: var(--docs-primary);
}

/* ===========================
   Support Cards
   =========================== */

.support-card {
  background: var(--docs-bg);
  border: 1px solid var(--docs-border);
  border-radius: 0.75rem;
  padding: 2rem;
  height: 100%;
  text-align: center;
}

.support-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.support-card h3 {
  color: var(--docs-text);
  margin-bottom: 1rem;
}

.support-card p {
  color: var(--docs-text-muted);
  font-size: 0.9375rem;
}

/* ===========================
   Footer
   =========================== */

.docs-footer {
  background: var(--docs-bg-secondary);
  border-top: 1px solid var(--docs-border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.docs-footer h5 {
  color: var(--docs-text);
  font-weight: 600;
  font-size: 1rem;
}

.docs-footer ul li {
  margin-bottom: 0.5rem;
}

.docs-footer a {
  color: var(--docs-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.docs-footer a:hover {
  color: var(--docs-primary);
}

.footer-bottom {
  border-top: 1px solid var(--docs-border);
  padding-top: 1.5rem;
  margin-top: 2rem;
  color: var(--docs-text-muted);
  font-size: 0.875rem;
}

/* ===========================
   Sidebar (para páginas internas)
   =========================== */

.docs-sidebar {
  position: sticky;
  top: 80px;
  height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 2rem 0;
}

.docs-sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.docs-sidebar-nav li {
  margin-bottom: 0.5rem;
}

.docs-sidebar-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--docs-text-muted);
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all 0.2s;
  font-size: 0.9375rem;
}

.docs-sidebar-nav a:hover {
  background: var(--docs-bg-secondary);
  color: var(--docs-primary);
}

.docs-sidebar-nav a.active {
  background: rgba(79, 70, 229, 0.1);
  color: var(--docs-primary);
  font-weight: 600;
}

.docs-sidebar-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  color: var(--docs-text-muted);
  padding: 0 1rem;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
}

.docs-sidebar-title:first-child {
  margin-top: 0;
}

/* ===========================
   Content Area
   =========================== */

.docs-content {
  padding: 2rem 0;
  max-width: 900px;
}

.docs-content h1,
.docs-content h2,
.docs-content h3,
.docs-content h4 {
  color: var(--docs-text);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.docs-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-top: 0;
}

.docs-content h2 {
  font-size: 2rem;
  font-weight: 700;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--docs-border);
}

.docs-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

.docs-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

.docs-content p {
  color: var(--docs-text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.docs-content code {
  background: var(--docs-bg-secondary);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: #e11d48;
  font-family: 'Monaco', 'Menlo', monospace;
}

.docs-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.docs-content table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
}

.docs-content table th,
.docs-content table td {
  padding: 0.75rem;
  border: 1px solid var(--docs-border);
  text-align: left;
}

.docs-content table th {
  background: var(--docs-bg-secondary);
  font-weight: 600;
  color: var(--docs-text);
}

.docs-content table td {
  color: var(--docs-text-muted);
}

/* ===========================
   Alerts/Callouts
   =========================== */

.alert-docs {
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
}

.alert-docs-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: var(--docs-text);
}

.alert-docs-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
  color: var(--docs-text);
}

.alert-docs-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
  color: var(--docs-text);
}

.alert-docs-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: var(--docs-text);
}

.alert-docs strong {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* ===========================
   Badges
   =========================== */

.badge-method {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-method.get {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.badge-method.post {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.badge-method.put {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.badge-method.patch {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
}

.badge-method.delete {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

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

@media (max-width: 991px) {
  .hero-docs {
    padding: 4rem 0 3rem;
  }

  .stats-inline {
    gap: 1rem;
  }

  .code-preview {
    margin-top: 2rem;
  }

  .timeline-docs {
    padding-left: 2rem;
  }

  .docs-sidebar {
    position: static;
    height: auto;
  }
}

@media (max-width: 767px) {
  .hero-docs h1 {
    font-size: 2rem;
  }

  .hero-docs .lead {
    font-size: 1.125rem;
  }

  .endpoint-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .endpoint-link {
    align-self: flex-end;
  }
}

