/* Текст */
.text-regular { font-weight: 400; }
.text-medium { font-weight: 500; }
.text-semibold { font-weight: 600; }
.text-bold { font-weight: 700; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.text-primary { color: var(--color-primary); }
.text-black { color: var(--color-text); }
.text-white { color: var(--color-white); }

.lh-tight { line-height: var(--lh-tight); }
.lh-base { line-height: var(--lh-base); }
.lh-relaxed { line-height: var(--lh-relaxed); }

/* Фон */
.bg-primary { background-color: var(--color-primary); }
.bg-muted { background-color: var(--color-muted-bg); }
.bg-white { background-color: var(--color-white); }

/* Радиусы */
.radius-sm { border-radius: var(--radius-sm); }
.radius-md { border-radius: var(--radius-md); }
.radius-lg { border-radius: var(--radius-lg); }

/* Простые flex-утилиты */
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }

/* Gap */
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

/* Отступы */
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }

.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }

/* Базовые кнопки */
.btn,
input[type=submit] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-primary);
  letter-spacing: -0.04em;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color .3s
}
input[type=submit] {
    padding: 20px 48px 20px 22px;
    border: none;
    outline: none;
    background: url(../img/arrow-right.svg) no-repeat right 20px center;
    cursor: pointer;
}
.btn:after {
    content: '';
    width: 16px;
    height: 16px;
    background: url(../img/sprite.svg) no-repeat -46px -42px;
}

.btn:hover {
  text-decoration: none;
  background-color: var(--color-muted-bg);
}

.btn-primary,
input[type=submit] {
  color: var(--color-white);
  background-color: var(--color-primary);
}

.btn-white {
  padding: 22px;
  color: #1539D3;
  background-color: #fff;
}

input[type=submit].btn-white {
    color: #1539D3;
    background-color: #fff;
}

input[type=submit].btn-white {
    background: #fff url(../img/arrow-right-b.svg) no-repeat right 20px center;
}

input[type=submit].btn-white {
    padding-right: 52px;
}

.btn-primary:after {
    background-position: -22px -42px;
}

.btn-primary:hover,
.btn-primary:focus,
input[type=submit]:hover,
input[type=submit]:focus {
   background-color: var(--color-primary-hover); 
}

/* =========================
   TABS
========================= */

.tabs {
  margin-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

/* список */
.tabs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 0;
  margin-bottom: 0;
}

.tabs__list li {
    margin-bottom: 0;
    list-style: none;
}

/* элемент */
.tabs__item a {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;

  font-size: 14px;
  font-weight: 500;

  color: var(--color-text);
  border-radius: 8px 8px 0 0;

  text-decoration: none;
  transition: all 0.2s ease;
}

/* hover */
.tabs__item a:hover {
  background: var(--color-muted-bg);
}

/* active */
.tabs__item.is-active a {
  color: var(--color-primary);
  font-weight: 600;
  background: #fff;
  border-bottom: 2px solid var(--color-primary);
}

/* =========================
   SECONDARY
========================= */

.tabs-secondary {
  margin-top: -12px;
}

.tabs__list--secondary .tabs__item a {
  height: 32px;
  font-size: 13px;
  padding: 0 12px;
  border-radius: 6px;
}

.tabs__list--secondary .tabs__item.is-active a {
  background: var(--color-muted-bg);
  border-bottom: none;
}

/* =========================
   MESSAGES
========================= */

.messages__wrapper {
  margin-bottom: 24px;
}

/* база */
.messages {
  position: relative;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  line-height: var(--lh-base);

  display: flex;
  align-items: flex-start;
  gap: 12px;

  border: 1px solid transparent;
}

/* =========================
   STATUS (успех)
========================= */

.messages--status {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

/* =========================
   ERROR
========================= */

.messages--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #7f1d1d;
}

/* =========================
   WARNING
========================= */

.messages--warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #78350f;
}

/* =========================
   INFO
========================= */

.messages--info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a8a;
}

/* =========================
   ИКОНКА (через before)
========================= */

.messages::before {
  font-size: 18px;
  line-height: 1;
  margin-top: 2px;
}

/* можно заменить на SVG позже */

.messages--status::before {
  content: "✔";
}

.messages--error::before {
  content: "✖";
}

.messages--warning::before {
  content: "⚠";
}

.messages--info::before {
  content: "ℹ";
}

.ajax-progress {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100vw;
  height: 100vh;

  background: rgba(255, 255, 255, 0.78);
}

.ajax-progress .message {
  display: none;
}

.ajax-progress .throbber {
  width: 54px;
  height: 54px;
  margin: 0;

  border: 4px solid rgba(21, 57, 211, 0.15);
  border-top-color: #1539d3;
  border-radius: 50%;

  background: none;
  animation: ajax-fullscreen-spin 0.8s linear infinite;
}

@keyframes ajax-fullscreen-spin {
  to {
    transform: rotate(360deg);
  }
}