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

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo img {
  height: 22px;
  width: auto;
}

.header-tag {
  font-size: 13px;
  color: var(--text-45);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  white-space: nowrap;
}

.site-footer {
  padding-block: 28px 40px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

@media (min-width: 640px) {
  .site-footer .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-note {
  font-size: 13px;
  color: var(--text-45);
  line-height: 1.5;
}

.footer-link {
  font-size: 13px;
  color: var(--text-60);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
}

.footer-link:hover {
  color: var(--text);
}

/* ===== Buttons ===== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding-inline: 24px;
  border-radius: var(--radius-pill);
  border: none;
  font-family: var(--font);
  font-weight: 500;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), filter var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--on-accent);
}

.btn-primary:hover {
  filter: brightness(1.06);
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  backdrop-filter: blur(20px);
}

.btn-secondary:hover {
  background: var(--surface-hover);
}

.btn-tertiary {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-72);
  height: 40px;
  padding-inline: 16px;
  font-size: 14px;
}

.btn-tertiary:hover {
  background: var(--surface);
  color: var(--text);
}

.btn-block {
  width: 100%;
}

.btn[disabled] {
  background: var(--surface);
  color: var(--text-24);
  pointer-events: none;
}

.icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-flex;
}

.icon svg {
  width: 100%;
  height: 100%;
}

/* Round icon-only nav button (Назад / Далее) */
.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding-inline: 18px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  backdrop-filter: blur(20px);
  transition: background var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}

.btn-nav:hover {
  background: var(--surface-hover);
}

.btn-nav[disabled] {
  opacity: 0.35;
  pointer-events: none;
}

.btn-nav .icon {
  width: 16px;
  height: 16px;
}

/* ===== Chips (plan / period / region selectors) ===== */

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding-inline: 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 2px solid transparent;
  color: var(--text-72);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
  -webkit-tap-highlight-color: transparent;
}

.chip:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.chip[aria-pressed='true'] {
  border-color: var(--accent);
  color: var(--text);
  background: var(--surface);
}

/* ===== Select / region trigger ===== */

.region-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.region-current {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  color: var(--text-60);
}

.region-current strong {
  color: var(--text);
  font-weight: 500;
}

.region-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding-inline: 14px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text-72);
  font-size: 14px;
}

.region-trigger:hover {
  background: var(--surface);
  color: var(--text);
}

/* ===== Bottom sheet ===== */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease);
  z-index: 40;
}

.sheet-backdrop[data-open='true'] {
  opacity: 1;
  pointer-events: auto;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  background: #191b21;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 8px 20px 24px;
  max-width: var(--container-max);
  margin-inline: auto;
  transform: translateY(100%);
  transition: transform var(--dur-base) var(--ease);
  max-height: 80vh;
  overflow-y: auto;
}

.sheet-backdrop[data-open='true'] .sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: var(--border-strong);
  margin: 10px auto 16px;
}

.sheet-title {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
}

.sheet-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 52px;
  padding-inline: 4px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  text-align: left;
}

.sheet-option:last-child {
  border-bottom: none;
}

.sheet-option[aria-selected='true'] {
  color: var(--accent);
}

.sheet-check {
  width: 18px;
  height: 18px;
  color: var(--accent);
  visibility: hidden;
}

.sheet-option[aria-selected='true'] .sheet-check {
  visibility: visible;
}

@media (min-width: 640px) {
  .sheet {
    left: auto;
    right: max(20px, calc((100vw - var(--container-max)) / 2 + 20px));
    bottom: 20px;
    width: 320px;
    border-radius: var(--radius-lg);
    border-bottom: 1px solid var(--border);
  }

  .sheet-handle {
    display: none;
  }
}

/* ===== Badge / callout ===== */

.callout {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--accent-8);
  background: var(--accent-8);
}

.callout .icon {
  color: var(--accent);
  margin-top: 2px;
}

.callout-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.callout-text {
  font-size: 14px;
  color: var(--text-72);
  line-height: 1.5;
}
