@font-face {
    font-family: "bootstrap-icons";
    src: url("/static/css/font/fonts/bootstrap-icons.d4777a5baf74.woff2") format("woff2");
    font-display: swap;
    font-style: normal;
    font-weight: normal;
}

body {
    padding-top: 62px !important;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 18px; /* Desktop default */
}

/* Responsive text sizing for mobile */
@media (max-width: 767.98px) {
    body {
        font-size: 15px; /* Mobile text size */
    }
}

/* Headings with Montserrat Bold */
h1, .h1 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 56px; /* Desktop h1 */
}

h2, .h2 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 36px; /* Desktop h2 */
}

h3, h4, h5, h6,
.h3, .h4, .h5, .h6 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
}

/* Mobile heading sizes */
@media (max-width: 767.98px) {
    h1, .h1 {
        font-size: 36px; /* Mobile h1 */
    }

    h2, .h2 {
        font-size: 28px; /* Mobile h2 */
    }
}

/* Brand and important text elements */
.navbar-brand,
.fw-bold,
.font-weight-bold,
strong, b {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
}

/* Buttons and interactive elements */
.btn,
button {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 18px; /* Desktop button size */
}

/* Mobile button sizes */
@media (max-width: 767.98px) {
    .btn,
    button {
        font-size: 16px; /* Mobile button size */
    }
}

/* Navigation links */
.nav-link,
.navbar-nav .nav-link {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 18px; /* Desktop menu size */
}

/* Mobile navigation sizes */
@media (max-width: 767.98px) {
    .nav-link,
    .navbar-nav .nav-link {
        font-size: 16px; /* Mobile menu size */
    }
}

/* Form elements */
input, textarea, select,
.form-control, .form-select {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
}

/* Card elements typography */
.card-title {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
}

.card-text {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
}

/* General paragraph text */
p {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
}

.navbar {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.navbar-brand {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.navbar-toggler {
    padding: 0.25rem 0.75rem !important; /* Стандартный padding для кнопки переключения */
}

/* ---------------------------------------------------------------------------
   Header — Scheme A (marketplace standard)
   The navbar is a single flex row; on desktop (>=1200px) the inline nav and
   the right cluster share it, on mobile the drawer wraps below.
   --------------------------------------------------------------------------- */

/* Priority+ header nav: every link renders inline; JS (see _navigation.html)
   moves the items that don't fit into the "More"/burger overflow (#navOverflow),
   so the header shows as many links as the current width allows and the rest stay
   one tap away. Nothing shrinks (flex-shrink:0) so overflow is measurable. */
#navContainer {
    display: flex;
    flex-wrap: nowrap; /* explicit — the purged build drops .flex-nowrap */
    align-items: center;
    gap: 0.25rem;
}
#navContainer > .navbar-brand {
    flex-shrink: 0;
}
#navCluster {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto; /* push the cluster right without the purged .ms-auto */
}
#navOverflow {
    flex-shrink: 0;
}
#primaryNav {
    display: flex;
    flex-direction: row; /* explicit — .flex-row may be purged */
    flex-wrap: nowrap;
    align-items: center;
    flex-shrink: 0; /* must NOT shrink, or overflow hides inside it and JS can't detect it */
    gap: 0.1rem;
    margin-bottom: 0;
}
#primaryNav .nav-item {
    flex-shrink: 0;
}
.cta-label {
    white-space: nowrap;
}
#primaryNav .nav-link {
    white-space: nowrap;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 15px;
}
/* Overflowed links render as normal dropdown rows inside the burger menu. */
#navOverflowMenu .nav-link {
    display: block;
    padding: 0.4rem 1rem;
    white-space: nowrap;
    color: inherit;
}
#navOverflowMenu .nav-link:hover,
#navOverflowMenu .nav-link:focus {
    background: rgba(0, 0, 0, 0.06);
}
.navbar .navbar-brand .fw-bold {
    font-size: 1.1rem;
    white-space: nowrap;
}
/* Reclaim width on small screens: CTA shrinks to "+", settings to the globe. */
@media (max-width: 575.98px) {
    .cta-label {
        display: none;
    }
}
@media (max-width: 767.98px) {
    .globe-label {
        display: none;
    }
}

/* The right-cluster icon buttons (search, heart, person) read as plain icons,
   not as underlined links. */
.navbar .btn-link {
    color: inherit;
}
.navbar .btn-link:hover {
    text-decoration: none;
}

/* The combined language·currency dropdown menu: give the switcher rows room. */
.navbar .dropdown-menu .lang-link,
.navbar .dropdown-menu .currency-link {
    padding: 0.1rem 0.25rem;
}

/* Mobile drawer rows: full-width tap targets. */
@media (max-width: 1199.98px) {
    #navbarDrawer .main-nav .nav-link {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

.footer {
    background-color: #f8f9fa;
}
/* Стиль для всех ссылок */
a {
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Стиль для ссылок при наведении */
a:hover {
    text-decoration: underline;
}

/* Фикс для выпадающего меню */
.dropdown-menu-end {
    right: 0;
    left: auto;
}

/* Ограничиваем ширину контейнера для правой части навигации */
.navbar-collapse-right {
    flex-grow: 0;
}

/* Переносим длинные имена пользователей */
.username-wrap {
    white-space: normal;
    /* max-width: 150px; */
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

.navbar-nav .nav-link:focus,
.dropdown-item:focus,
.btn:focus {
    outline: 3px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #f8f9fa;
    /* Добавьте свои кастомные цвета */
  }

  .theme-icon-active {
    display: inline-block !important;
  }

/* ──────────────────────────────────────────────────────────────────────
   docs/54 Slice 1 — auth screen button hierarchy.

   Replaces the old flat block where .btn-google / .btn-telegram /
   .btn-outline-primary / #loginSubmitButton were ALL forced to one identical
   transparent/outline style — so nothing read as the primary action.

   New rule: exactly ONE filled button per card — Google (.btn-auth-google).
   Everything else (.btn-auth-telegram, .btn-auth-outline, .btn-auth-submit)
   is outline. .btn-auth carries the shared sizing (~46px, full width).
   ────────────────────────────────────────────────────────────────────── */

/* Shared shape/size for every auth button (~46px tap target). */
.btn-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0.55rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.4;
  border-radius: 6px;
  transition: all 0.15s ease;
  /* !important: these buttons are <a> tags; beat the global a:hover underline so
     no button gets a stray underline on hover (consistency). */
  text-decoration: none !important;
}
.btn-auth.btn-sm {
  min-height: 38px;
  font-size: 0.9rem;
}
.btn-auth i.bi {
  font-size: 1.2rem;
  line-height: 1;
  vertical-align: middle;
}
.btn-auth span {
  display: inline-block;
  vertical-align: middle;
  line-height: 1.4;
}

/* THE single filled primary: Google — in the site theme accent (var(--bs-primary)
   = terracotta under v2, falls back to Bootstrap blue under v1). */
.btn-auth-google {
  background-color: var(--bs-primary);
  border: 1px solid var(--bs-primary);
  /* !important: <a> link-hover colour must not turn the text terracotta on the
     terracotta button (it would merge with the background). */
  color: #fff !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.btn-auth-google:hover,
.btn-auth-google:focus {
  /* Explicit darker accent on hover (not filter, which dimmed the text too) —
     keeps strong white-on-terracotta contrast. */
  background-color: var(--v2-accent-ink, #0a58ca);
  border-color: var(--v2-accent-ink, #0a58ca);
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.btn-auth-google svg path { fill: #fff; }

/* Everything else: outline in the same theme accent (text stays terracotta on
   hover — !important beats the global <a> link-hover colour). */
.btn-auth-outline,
.btn-auth-submit,
.btn-auth-telegram {
  background-color: transparent;
  border: 1px solid var(--bs-primary);
  color: var(--bs-primary) !important;
}
.btn-auth-outline:hover,
.btn-auth-outline:focus,
.btn-auth-submit:hover,
.btn-auth-submit:focus,
.btn-auth-telegram:hover,
.btn-auth-telegram:focus {
  background-color: rgba(var(--bs-primary-rgb), 0.10);
  border-color: var(--bs-primary);
  color: var(--bs-primary) !important;
}
.btn-auth-telegram i.bi { color: var(--bs-primary); }

/* Widened, centered auth card (docs/54 Slice 1 — was a thin col-lg-4). */
.auth-card { max-width: 440px; }

/* Thin "or" divider replacing the giant <hr class="my-5"> separators. */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #9aa0a6;
  font-size: 0.85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #dee2e6;
}
.auth-divider span {
  padding: 0 0.75rem;
  text-transform: lowercase;
}

/* Fixed-height error slot so revealing form errors does not shift layout. */
.auth-error-slot {
  min-height: 1.25rem;
  margin-bottom: 0.5rem;
}

/* "More options" disclosure. */
.auth-more > summary {
  cursor: pointer;
  list-style: none;
  text-align: center;
}
.auth-more > summary::-webkit-details-marker { display: none; }

/* Legacy social-button styles (still used by non-auth-card snippets). */
.btn-google,
.btn-telegram {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0.75rem 1rem !important;
  min-height: 48px !important;
  line-height: 1.5 !important;
  font-size: 1rem !important;
  border-radius: 4px !important;
  width: 100% !important;
}

/* Стили для маленьких кнопок */
.btn-sm {
    font-size: 12px;
    padding: 4px 8px;
    min-height: 28px;
    line-height: 1.4;
}

/* Выравнивание кнопок социальных сетей по левому краю на странице аккаунта */
.account-social-buttons .btn-google,
.account-social-buttons .btn-telegram {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Стили для страницы аккаунта */
.account-email {
    display: flex;
    align-items: center;
    height: 24px;
    line-height: 1;
}

.primary-badge {
    margin-left: 10px;
    background-color: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    height: 24px;
    text-align: center;
    display: flex;
    align-items: center;
}

.social-account-item {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.provider-name {
    font-weight: bold;
}

.account-details {
    line-height: 1;
}

.inline-form {
    line-height: 1;
    height: 24px;
    padding: 0;
    margin: 0;
    vertical-align: middle;
}

.auto-bump-card {
    border: 2px solid var(--bs-primary, #0d6efd) !important;
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb, 13, 110, 253), 0.2) !important;
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: -2px;
}

.language-choice-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid #dee2e6;
    padding: 12px 0;
    z-index: 1035;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
}

.language-choice-banner .btn-link {
    color: #6c757d;
    text-decoration: none;
}

.language-choice-banner .btn-link:hover {
    color: #495057;
}

/* Verified-seller trust badge (docs/46 slice 8) — recognizable blue verified
   checkmark, icon-only; the "Verified seller" label lives in aria-label/title. */
.trust-badge {
    display: inline-flex;
    align-items: center;
    color: #1d9bf0;
    vertical-align: middle;
    line-height: 1;
}

.trust-badge .bi {
    font-size: 1em;
}
