/* Base tokens -------------------------------------------------- */
:root {
  --support-primary-text: #212121;
  --support-secondary-text: #888888;
  --support-bg: #ffffff;
  --support-card-bg: rgba(0, 0, 0, 0.02);
  --support-input-bg: rgba(0, 0, 0, 0.04);
  --support-border: rgba(0, 0, 0, 0.08);
  --support-arrow-bg: #f6f6f6;
}

.bg-primary-bg,
.bg-background {
  background-color: var(--support-bg);
}

.bg-input-bg {
  background-color: var(--support-input-bg);
}

.text-primary-text,
.text-primary {
  color: var(--support-primary-text);
}

.text-secondary-text,
.text-secondary {
  color: var(--support-secondary-text);
}

.border-border-color {
  border-color: var(--support-border);
}

.bg-card-bg {
  background-color: var(--support-card-bg);
}

/* 404 page helpers ------------------------------------------- */
.breadcrumb-link {
  display: flex;
  padding: 2px;
  align-items: center;
  gap: 4px;
  border-radius: 4px;
  transition: background 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}

.breadcrumb-link:hover {
  background: rgba(0, 0, 0, 0.04);
}

.error-illustration {
  display: flex;
  width: 100%;
  max-width: 400px;
  justify-content: center;
  align-items: center;
  padding: 15.352px 0.195px 14.453px 0;
}

.button-secondary {
  display: flex;
  height: 56px;
  padding: 0 24px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0);
  background: #EAE8FF;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
}

.button-secondary:hover {
  background: #DAD8F5;
}

.text-button-secondary-text {
  color: #674FF1;
}

.button-base {
  display: flex;
  height: 40px;
  padding: 0 16px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0);
  background: rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: background 0.2s ease;
}

.button-base:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* Category Buttons */
.category-button {
  display: flex;
  width: 100%;
  height: 100px;
  max-width: 944px;
  padding: 24px 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.02);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
}

.category-button:hover {
  background: rgba(0, 0, 0, 0.04);
}

.category-button span {
  align-self: stretch;
  color: #000;
  font-size: 24px;
  font-weight: 700;
  line-height: 28px;
  padding-right: 90px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.category-button .category-icon {
  position: absolute;
  right: 24px;
  bottom: 20.648px;
  display: flex;
  width: 58px;
  height: 58px;
  justify-content: center;
  align-items: center;
  opacity: 0.6;
  font-size: 32px;
}

/* Support Cards — контейнер на flex вместо grid */
.support-cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.support-cards-container .support-card {
  flex: 1 1 224px;
}

@media (min-width: 640px) {
  .support-cards-container .support-card {
    flex: 1 1 calc(50% - 12px);
  }
}

@media (min-width: 1024px) {
  .support-cards-container .support-card {
    flex: 1 1 calc(33.333% - 16px);
  }
}

.support-card {
  display: flex;
  width: 100%;
  min-width: 224px;
  max-width: 944px;
  padding: 4px;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  border-radius: 16px;
  background: var(--support-card-bg);
}

.support-card .card-title {
  display: flex;
  padding: 16px 16px 0 16px;
  align-self: stretch;
  flex: 0 0 auto;
  min-height: 64px;
  color: #212121;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.support-card .card-content {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 4px;
  flex: 1 1 auto;
  align-self: stretch;
}

.support-card .card-item {
  display: flex;
  padding: 8px 16px;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.support-card .card-item:hover {
  background: rgba(0, 0, 0, 0.02);
}

.support-card .card-item span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1 0 0;
  color: #212121;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
}

.support-card .view-all-button {
  display: flex;
  padding: 16px;
  justify-content: center;
  align-items: center;
  align-self: stretch;
  border-radius: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: background 0.2s ease;
}

.support-card .view-all-button:hover {
  background: rgba(0, 0, 0, 0.02);
}

.support-card .view-all-button span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1 0 0;
  color: #212121;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.support-card .arrow-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  background: var(--support-arrow-bg);
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .category-button {
    height: auto;
    min-height: 100px;
    padding: 20px 24px;
  }
  
  .category-button span {
    font-size: 20px;
    line-height: 24px;
    padding-right: 70px;
  }
  
  .category-button .category-icon {
    right: 16px;
    bottom: 16px;
    width: 48px;
    height: 48px;
    font-size: 24px;
  }
  
  .support-card .card-title {
    font-size: 16px;
    line-height: 22px;
  }
  
  .support-card .card-item span,
  .support-card .view-all-button span {
    font-size: 14px;
    line-height: 20px;
  }
}

@media (min-width: 320px) and (max-width: 480px) {
  .category-button span {
    font-size: 18px;
    padding-right: 60px;
  }
}

/* Article content styles ----------------------------------------- */
article ul,
article ol {
  margin: 16px 0;
  padding-left: 24px;
  list-style-position: outside;
}

article ul {
  list-style-type: disc;
}

article ol {
  list-style-type: decimal;
}

article li {
  margin: 8px 0;
  line-height: 1.6;
  color: var(--support-primary-text);
}

article ul ul,
article ol ul {
  list-style-type: circle;
  margin-top: 8px;
  margin-bottom: 8px;
}

article ul ul ul,
article ol ol ul {
  list-style-type: square;
}

article ol ol {
  list-style-type: lower-alpha;
  margin-top: 8px;
  margin-bottom: 8px;
}

article ol ol ol {
  list-style-type: lower-roman;
}

/* Article links */
article a {
  color: #674FF1;
  text-decoration: none;
  transition: color 0.2s ease;
}

article a:hover {
  color: #561EE3;
  text-decoration: none;
}

/* Search results -------------------------------------------------- */
.search-result-card {
  display: flex;
  padding: 24px;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  align-self: stretch;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: background 0.2s ease;
}

.search-result-card:hover {
  background: rgba(0, 0, 0, 0.04);
}

.search-result-card .result-title {
  display: flex;
  align-items: center;
  align-self: stretch;
  flex: 1 0 0;
  color: #674FF1;
  font-size: 18px;
  line-height: 24px;
}

.search-result-card .result-excerpt {
  align-self: stretch;
  color: #000;
  font-size: 16px;
  line-height: 24px;
}

.pagination-btn {
  display: flex;
  width: 40px;
  height: 40px;
  min-width: 40px;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pagination-btn:hover:not(.pagination-btn-disabled) {
  background: rgba(0, 0, 0, 0.04);
}

.pagination-btn-disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.pagination-number {
  display: flex;
  width: 40px;
  height: 40px;
  padding: 8px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border-radius: 8px;
  color: #212121;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease;
}

.pagination-number-active {
  background: rgba(0, 0, 0, 0.04);
}

.pagination-ellipsis {
  cursor: default;
}

@media (max-width: 640px) {
  .search-result-card .result-title {
    font-size: 16px;
    line-height: 22px;
  }

  .search-result-card .result-excerpt {
    font-size: 14px;
    line-height: 20px;
  }

  .pagination-number {
    font-size: 14px;
    line-height: 20px;
  }
}

/* Page load speed (only for admins) ---------------------------- */
.support-page-speed {
  position: fixed;
  bottom: 8px;
  right: 8px;
  z-index: 9999;
  display: flex;
  gap: 12px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.3;
  color: var(--support-secondary-text);
  background: var(--support-card-bg);
  border: 1px solid var(--support-border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
