@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700&display=swap');

* {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

body {
  background: #f0f2f5;
  color: #222;
}

#main {
  overflow-y: auto;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  border: 2px dashed #d0d8f0;
  border-radius: 14px;
  background: #f8faff;
  margin-top: 10px;
}

/* Colors */
.cl-evangeline {
  color: #86efac;
}

.cl-Portage {
  color: #8aa4f2;
}

.cl-fresh-blue {
  color: #7dd3fc;
}

.cl-heron-blue {
  color: #6b7fa0;
}

.cl-oslo {
  color: #94a3b8;
}

.text-container {
  background: #f7f9ff;
  border: 1px solid #e5e9f2;
  font-size: 0.82rem;
  padding: 1rem !important;
  border-radius: var(--bs-border-radius) !important;
  margin-bottom: .5rem !important;
  display: block;
}


/* Sidebar */
#sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 270px;
  height: 100vh;
  background: #1a1f2e;
  overflow-y: auto;
  z-index: 100;
  padding-bottom: 30px;
}

#sidebar::-webkit-scrollbar {
  width: 5px;
}

#sidebar::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 3px;
}

.sidebar-header {
  background: linear-gradient(135deg, #2c3e6b, #1a1f2e);
  padding: 20px 16px;
  border-bottom: 1px solid #2d3350;
  text-align: center;
}

.sidebar-header img {
  max-width: 145px;
  margin-bottom: 10px;
  border-radius: 7px;
}

.sidebar-header h5 {
  color: #fff;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.sidebar-header small {
  color: #8fa0c0;
}

.sidebar-search {
  padding: 10px 12px;
  border-bottom: 1px solid #2d3350;
}

.sidebar-search input {
  background: #2d3350;
  border: none;
  color: #fff;
  font-size: 0.82rem;
  border-radius: 6px;
  padding: 6px 10px;
}

.sidebar-search input::placeholder {
  color: #6b7fa0;
}

.sidebar-search input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #4a6cf7;
}

.tag-group {
  border-bottom: 1px solid #2d3350;
}

.tag-header {
  padding: 10px 14px;
  cursor: pointer;
  color: #a0b0d0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
  text-transform: uppercase;
}

.tag-header:hover {
  background: #2d3350;
  color: #fff;
}

.tag-header .tag-count {
  background: #3a4460;
  color: #8fa0c0;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.72rem;
}

.endpoint-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 24px;
  cursor: pointer;
  color: #8fa0c0;
  font-size: 0.78rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.endpoint-link:hover {
  background: #2d3350;
  color: #fff;
}

.endpoint-link.active {
  background: #2d3350;
  color: #fff;
  border-right: 3px solid #4a6cf7;
}

/* Main content */
#main {
  margin-right: 270px;
  padding: 30px 36px;
  min-height: 100vh;
}

.page-header {
  background: linear-gradient(135deg, #2c3e6b, #1e3a6e);
  color: #fff;
  border-radius: 14px;
  padding: 32px 36px;
  margin-bottom: 30px;
}

.page-header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  color: #b0c4de;
  margin-bottom: 0;
  font-size: 0.92rem;
}

.header-download-button {
  margin-inline-start: auto;
}

.page-header-links {
  font-size: 0.85rem;
}

.page-header-links a.page-header-link {
  color: #b0c4de;
}

.info-cards {
  display: flex;
  gap: 14px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.info-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  flex: 1;
  min-width: 160px;
  border: 1px solid #e5e9f2;
}

.info-card .label {
  color: #777;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.info-card .value {
  font-size: 1rem;
  font-weight: 700;
  color: #2c3e6b;
}

/* Tag section */
.tag-section {
  margin-bottom: 36px;
}

.tag-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2c3e6b;
  padding: 12px 18px;
  background: #e8edf8;
  border-radius: 10px 10px 0 0;
  border-right: 4px solid #4a6cf7;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Endpoint card */
.endpoint-card {
  background: #fff;
  border: 1px solid #e5e9f2;
  border-radius: 0;
  margin-bottom: 0;
  border-top: 1px solid #e5e9f2;
}

.endpoint-card:last-child {
  border-radius: 0 0 10px 10px;
}

.endpoint-card:first-child {
  border-radius: 0;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.endpoint-header:hover {
  background: #f7f9ff;
}

.method-badge {
  display: inline-block;
  padding: 2px 6px 1px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 48px;
  text-align: center;
  letter-spacing: 0.5px;
}

.method-GET {
  background: #d4edda;
  color: #155724;
}

.method-POST {
  background: #cce5ff;
  color: #004085;
}

.method-PUT {
  background: #fff3cd;
  color: #856404;
}

.method-DELETE {
  background: #f8d7da;
  color: #721c24;
}

.method-PATCH {
  background: #e2d9f3;
  color: #432874;
}

.endpoint-path {
  font-family: 'Courier New', monospace;
  font-size: 0.83rem;
  color: #333;
  flex: 1;
  direction: ltr;
  text-align: right;
}

.endpoint-summary {
  font-size: 1.2rem;
  font-weight: bold;
  color: #666;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lock-icon {
  color: #f59e0b;
  font-size: 0.82rem;
}

.endpoint-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  direction: ltr;
}

.endpoint-body {
  padding: 0 18px 18px;
  border-top: 1px solid #f0f2f8;
  background: #e8e8e887;
}

.endpoint-section {
  padding: 5px 15px;
  ;
  border-radius: 7px;
  margin: 6px 0 15px 0;
  background-color: #fff;
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15) !important;
}

.endpoint-url .endpoint-path {
  flex: none;
  display: block;
}

/* Tables */
.params-table {
  font-size: 0.82rem;
  margin-bottom: 0;
}

.params-table th {
  background: #f0f4ff;
  color: #2c3e6b;
  font-weight: 600;
  font-size: 0.78rem;
}

.params-table td {
  vertical-align: middle;
}

.section-label {
  font-size: 0.90rem;
  font-weight: 700;
  color: #4a6cf7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 5px 0 8px;
}

.type-badge {
  background: #e8f0fe;
  color: #2c3e6b;
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: monospace;
}

.required-badge {
  background: #fde8e8;
  color: #c0392b;
}

.optional-badge {
  background: #e8f5e9;
  color: #2e7d32;
}

.response-badge {
  padding: 2px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 700;
}

.response-200 {
  background: #d4edda;
  color: #155724;
}

.response-403 {
  background: #fff3cd;
  color: #856404;
}

.response-500 {
  background: #f8d7da;
  color: #721c24;
}

.response-other {
  background: #e2e3e5;
  color: #383d41;
}

.schema-ref {
  font-family: monospace;
  font-size: 0.75rem;
  color: #7c3aed;
  background: #f5f3ff;
  padding: 1px 7px;
  border-radius: 4px;
}

.security-badge {
  background: #fff8e1;
  color: #e65100;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 0.73rem;
  font-weight: 600;
}

.content-types {
  font-size: 0.75rem;
  color: #777;
  font-family: monospace;
}

/* Auth section */
.auth-section {
  background: #fff;
  border-radius: 10px;
  padding: 20px 24px;
  border: 1px solid #e5e9f2;
  margin-bottom: 30px;
}

.auth-section h5 {
  color: #2c3e6b;
  font-weight: 700;
  margin-bottom: 14px;
}

/* Collapse icon */
.collapse-icon {
  color: #999;
  font-size: 0.8rem;
  transition: transform 0.2s;
}

.endpoint-header.collapsed .collapse-icon {
  transform: rotate(-90deg);
}

/* Server info */
.server-section {
  background: #1a1f2e;
  color: #a0b0d0;
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 30px;
  font-family: monospace;
  font-size: 0.83rem;
}

.server-section .base-details {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* Sticky sidebar search results */
.no-result {
  color: #6b7fa0;
  padding: 10px 14px;
  font-size: 0.8rem;
}

/* Misc utility */
.alert-note {
  font-size: 0.82rem;
}

.empty-state-icon {
  color: #4a6cf7;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e6b;
  margin-bottom: 6px;
}

.empty-state-subtitle {
  font-size: 0.83rem;
  color: #888;
}

.security-icon {
  color: #f59e0b;
}

.security-text {
  font-size: 0.8rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  #sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }

  #main {
    margin-right: 0;
    padding: 16px;
  }
}
