/* --- Фирменный блок: герб плюс надпись -----------------------------------
   Надпись — обычный текст, а не часть картинки. Подробности в
   partials/acc/logo.blade.php: SVG через <img> не видит шрифты страницы,
   поэтому надпись внутри картинки обрезалась. */

.acc-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--acc-text);
  line-height: 1;
  white-space: nowrap;
}
.acc-logo:hover { text-decoration: none; color: var(--acc-text); }

.acc-logo__crest {
  flex: 0 0 auto;
  display: block;
  width: auto;
}

.acc-logo__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.acc-logo__name {
  font-family: var(--acc-font-display);
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--acc-text);
}

.acc-logo__tag {
  font-family: var(--acc-font-mono);
  letter-spacing: 2.6px;
  text-transform: uppercase;
  color: var(--acc-cyan);
}

.acc-logo--md .acc-logo__crest { height: 42px; }
.acc-logo--md .acc-logo__name  { font-size: 22px; }
.acc-logo--md .acc-logo__tag   { font-size: 9.5px; }

.acc-logo--sm .acc-logo__crest { height: 30px; }
.acc-logo--sm .acc-logo__name  { font-size: 16px; letter-spacing: 1.1px; }
.acc-logo--sm .acc-logo__tag   { font-size: 8px; letter-spacing: 1.8px; }

/* На узком экране подпись уходит: две строки в шапке телефона съедают
   высоту, ради которой шапку и делают низкой. */
@media (max-width: 575.98px) {
  .acc-logo__tag { display: none; }
  .acc-logo--md .acc-logo__name { font-size: 18px; }
}

/* ==========================================================================
   AirCrewCentral — компоненты дизайн-системы
   Требует acc-tokens.css, подключается после него.

   ВАЖНО: все классы начинаются с .acc- и ни один существующий элемент
   сайта их не использует. Подключение этого файла НЕ МЕНЯЕТ внешний вид
   ни одной страницы. Компоненты начинают работать только там, где мы
   сами их поставим.

   Это сделано намеренно: фундамент кладётся отдельно от переделки страниц,
   чтобы одно не ломало другое.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Стеклянная карточка
   -------------------------------------------------------------------------- */

.acc-card {
  background: var(--acc-glass);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid var(--acc-glass-brd);
  border-radius: var(--acc-r-card);
  box-shadow: var(--acc-shadow-card), var(--acc-shadow-inset);
  padding: var(--acc-sp-6);
  color: var(--acc-text);
}

/* Запасной вариант: без backdrop-filter стекло превращается
   в мутный прямоугольник, поэтому даём сплошную заливку. */
@supports not (backdrop-filter: blur(12px)) {
  .acc-card {
    background: var(--acc-bg-700);
  }
}

.acc-card--flat {
  background: var(--acc-bg-800);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* --------------------------------------------------------------------------
   Кнопки
   -------------------------------------------------------------------------- */

.acc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--acc-sp-2);
  min-height: 44px;
  padding: 0 var(--acc-sp-6);
  border: 1px solid var(--acc-glass-brd);
  border-radius: var(--acc-r-ctrl);
  background: transparent;
  color: var(--acc-text);
  font-family: var(--acc-font-text);
  font-size: var(--acc-fs-14);
  font-weight: 500;
  letter-spacing: 0.3px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--acc-dur-fast) var(--acc-ease),
              border-color var(--acc-dur-fast) var(--acc-ease),
              box-shadow var(--acc-dur-fast) var(--acc-ease);
}

.acc-btn:hover {
  background: var(--acc-raise);
  border-color: var(--acc-glass-hi);
  color: var(--acc-text);
}

.acc-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--acc-bg-900), 0 0 0 4px var(--acc-cyan);
}

.acc-btn--primary {
  background: var(--acc-cyan);
  border-color: var(--acc-cyan);
  color: var(--acc-bg-900);
  font-weight: 600;
}

.acc-btn--primary:hover {
  background: var(--acc-cyan-dim);
  border-color: var(--acc-cyan-dim);
  color: var(--acc-bg-900);
  box-shadow: 0 0 24px var(--acc-cyan-glow);
}

/* Пульсирующая кнопка — ТОЛЬКО ОДНА НА СТРАНИЦУ.
   Две пульсирующие кнопки убивают эффект обеих. */
.acc-btn--pulse {
  animation: acc-pulse 2.4s var(--acc-ease) infinite;
}

@keyframes acc-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--acc-cyan-glow); }
  50%      { box-shadow: 0 0 0 12px transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .acc-btn--pulse { animation: none; }
}

/* --------------------------------------------------------------------------
   Счётчик статистики
   -------------------------------------------------------------------------- */

.acc-stat__value {
  font-family: var(--acc-font-mono);
  font-size: var(--acc-fs-48);
  font-weight: 500;
  line-height: 1.1;
  color: var(--acc-cyan);
  font-variant-numeric: tabular-nums;
}

.acc-stat__label {
  margin-top: var(--acc-sp-2);
  font-family: var(--acc-font-text);
  font-size: var(--acc-fs-12);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--acc-text-mute);
}

.acc-stat__note {
  margin-top: var(--acc-sp-1);
  font-size: var(--acc-fs-12);
  color: var(--acc-text-dim);
}

/* --------------------------------------------------------------------------
   Бейджи и чипы
   -------------------------------------------------------------------------- */

.acc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--acc-r-pill);
  font-family: var(--acc-font-text);
  font-size: var(--acc-fs-12);
  font-weight: 500;
  letter-spacing: 0.4px;
  border: 1px solid transparent;
}

.acc-badge--cyan { background: var(--acc-cyan-soft); color: var(--acc-cyan); border-color: var(--acc-cyan-glow); }
.acc-badge--gold { background: var(--acc-gold-soft); color: var(--acc-gold); border-color: var(--acc-gold-brd); }
.acc-badge--ok   { background: var(--acc-ok-soft);  color: var(--acc-ok);   border-color: var(--acc-ok-brd); }
.acc-badge--err  { background: var(--acc-err-soft);  color: var(--acc-err);  border-color: var(--acc-err-brd); }
.acc-badge--mute { background: var(--acc-ghost); color: var(--acc-text-dim); border-color: var(--acc-glass-brd); }

/* --------------------------------------------------------------------------
   Полётные данные — всегда моноширинным.
   Одна деталь, которая мгновенно отличает авиационный интерфейс
   от обычного сайта: ICAO, время UTC, номер рейса, вес груза.
   -------------------------------------------------------------------------- */

.acc-data {
  font-family: var(--acc-font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.acc-icao {
  font-family: var(--acc-font-mono);
  font-size: var(--acc-fs-20);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--acc-text);
}

/* --------------------------------------------------------------------------
   Маршрут ICAO -> ICAO
   -------------------------------------------------------------------------- */

.acc-route {
  display: inline-flex;
  align-items: center;
  gap: var(--acc-sp-3);
}

.acc-route__line {
  flex: 1;
  min-width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--acc-cyan), var(--acc-cyan-dim));
  position: relative;
}

.acc-route__dist {
  font-family: var(--acc-font-mono);
  font-size: var(--acc-fs-12);
  color: var(--acc-text-mute);
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Тёмная таблица данных
   -------------------------------------------------------------------------- */

.acc-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--acc-font-text);
  font-size: var(--acc-fs-14);
  color: var(--acc-text);
}

.acc-table th {
  text-align: left;
  padding: var(--acc-sp-3) var(--acc-sp-4);
  font-size: var(--acc-fs-12);
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--acc-text-mute);
  border-bottom: 1px solid var(--acc-glass-brd);
}

.acc-table td {
  padding: var(--acc-sp-3) var(--acc-sp-4);
  border-bottom: 1px solid var(--acc-raise);
}

.acc-table tbody tr {
  transition: background var(--acc-dur-fast) var(--acc-ease);
}

.acc-table tbody tr:hover {
  background: var(--acc-raise);
}

/* --------------------------------------------------------------------------
   Шеврон ранга и медаль — подложки под SVG из brand/
   -------------------------------------------------------------------------- */

.acc-rank {
  display: inline-flex;
  align-items: center;
  gap: var(--acc-sp-3);
}

.acc-rank__chevron {
  height: 24px;
  width: auto;
  flex: 0 0 auto;
}

.acc-rank__name {
  font-family: var(--acc-font-display);
  font-size: var(--acc-fs-16);
  font-weight: 600;
  letter-spacing: 0.6px;
  color: var(--acc-gold);
  text-transform: uppercase;
}

.acc-medal {
  width: 96px;
  height: 96px;
  display: block;
}

.acc-medal--locked {
  filter: grayscale(1);
  opacity: 0.28;
}

/* --------------------------------------------------------------------------
   Прогресс до следующего ранга
   -------------------------------------------------------------------------- */

.acc-progress {
  height: 6px;
  border-radius: var(--acc-r-pill);
  background: var(--acc-hover);
  overflow: hidden;
}

.acc-progress__bar {
  height: 100%;
  border-radius: var(--acc-r-pill);
  background: linear-gradient(90deg, var(--acc-cyan-dim), var(--acc-cyan));
  transition: width var(--acc-dur-slow) var(--acc-ease-out);
}

/* --------------------------------------------------------------------------
   Сетка
   -------------------------------------------------------------------------- */

.acc-grid {
  display: grid;
  gap: var(--acc-sp-4);
}

.acc-grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.acc-grid--3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.acc-grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.acc-section {
  padding-block: var(--acc-sp-24);
}

/* --------------------------------------------------------------------------
   Служебное
   -------------------------------------------------------------------------- */

.acc-mono { font-family: var(--acc-font-mono); }
.acc-display { font-family: var(--acc-font-display); }
.acc-dim { color: var(--acc-text-dim); }
.acc-mute { color: var(--acc-text-mute); }
.acc-cyan { color: var(--acc-cyan); }
.acc-gold { color: var(--acc-gold); }

.acc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   PILOT LICENCES (profile card)
   ========================================================================== */

/* This block lives inside a card from the purchased theme, so it borrows
   that card's text colour rather than setting its own. Only the three
   states — fine, due soon, expired — reach for our own palette, because
   those are the whole point of the list. */

.acc-lic__none {
  margin: 0;
  color: var(--acc-text-mute);
  line-height: 1.6;
}

.acc-lic__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.acc-lic__item {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--acc-glass-brd);
}

.acc-lic__item:last-child { border-bottom: 0; }

.acc-lic__name {
  font-family: var(--acc-font-display);
  font-size: var(--acc-fs-14);
  font-weight: 700;
  letter-spacing: .01em;
}

/* Where the rating came from. Small and quiet: it matters when you are
   asking why one of them has no expiry, and not before. */
.acc-lic__src {
  font-family: var(--acc-font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--acc-text-mute);
}

.acc-lic__when {
  font-family: var(--acc-font-mono);
  font-size: var(--acc-fs-12);
  color: var(--acc-text-mute);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Thirty days out the line changes colour, and it keeps that colour
   until the training is done. A warning that appears once and goes away
   is a warning you can miss on the one evening you did not log in. */
.acc-lic__item--soon .acc-lic__when { color: var(--acc-warn); }

.acc-lic__item--expired .acc-lic__name,
.acc-lic__item--expired .acc-lic__when { color: var(--acc-err); }

.acc-lic__item--ok .acc-lic__when { color: var(--acc-ok); }

.acc-lic__renew {
  font-family: var(--acc-font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--acc-glass-brd);
  border-radius: var(--acc-r-pill);
  color: var(--acc-cyan);
  white-space: nowrap;
}

.acc-lic__renew:hover {
  border-color: var(--acc-cyan);
  color: var(--acc-cyan);
}

.acc-lic__item--expired .acc-lic__renew {
  border-color: var(--acc-err);
  color: var(--acc-err);
}

.acc-lic__foot {
  margin: 14px 0 0;
  font-size: var(--acc-fs-12);
  line-height: 1.6;
  color: var(--acc-text-mute);
}

.acc-lic__foot a { color: var(--acc-cyan); }

.acc-lic__sub {
  margin: 22px 0 6px;
  font-family: var(--acc-font-mono);
  font-size: 10px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--acc-text-mute);
}

/* The "you could add these" list is an offer, not a record. It is set
   quieter than the ratings above so the eye reads the two as different
   kinds of thing rather than one long list. */
.acc-lic__list--offer .acc-lic__name { font-weight: 600; }
.acc-lic__list--offer .acc-lic__src { text-transform: none; letter-spacing: 0; font-size: 11px; }

@media (max-width: 640px) {
  .acc-lic__item {
    grid-template-columns: 4.5rem 1fr;
    row-gap: 4px;
  }

  .acc-lic__when,
  .acc-lic__renew { grid-column: 2; justify-self: start; }
}

/* ==========================================================================
   SHOP: what is not sold here
   ========================================================================== */

/* Placed above the item grid, not in the footer: someone who came looking
   for a type rating will leave before reaching a footer. It is set as a
   quiet note rather than a warning — nothing is wrong, they are simply in
   the wrong room.

   Lives in this file rather than beside the other .acc-shop rules because
   this one is loaded on every page, and the shop's own stylesheet is not. */
.acc-shop__note {
  margin: -4px 0 var(--acc-sp-4, 16px);
  padding: 10px 14px;
  border: 1px solid var(--acc-glass-brd);
  border-left-width: 3px;
  border-radius: var(--acc-r-ctrl);
  font-size: 13px;
  line-height: 1.55;
  color: var(--acc-text-mute);
}

.acc-shop__note a {
  color: var(--acc-cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.acc-shop__note a:hover { border-bottom-color: var(--acc-cyan); }
