/* ==========================================================================
   AYCM EBL 3 – közös dizájn tokenek (gombok, modál fejléc)
   Minden layout és modul ezekre hivatkozik.
   ========================================================================== */

:root {
  /* Kisméretű akciógombok – modálok, szűrők, segédletek */
  --ebl-btn-height: 30px;
  --ebl-btn-min-width: 120px;
  --ebl-btn-radius: 10px;
  --ebl-btn-font-size: 12px;
  --ebl-btn-font-weight: 700;
  --ebl-btn-padding-block: 2px;
  --ebl-btn-padding-inline: 4px;
  --ebl-btn-gap: 4px;
  --ebl-btn-accent-soft: rgba(153, 110, 255, 0.10);
  --ebl-btn-accent-outline: #9A6EFF;
  --ebl-btn-border-muted: #E0E0E0;

  /* Modál tipográfia – Figma etalon */
  --ebl-modal-text: #000000;
  --ebl-modal-label-size: 12px;
  --ebl-modal-label-weight: 700;
  --ebl-modal-input-size: 12px;
  --ebl-modal-input-weight: 400;
  --ebl-modal-placeholder-color: #979797;
  --ebl-modal-hint-color: #979797;
  --ebl-modal-hint-size: 10px;
  --ebl-modal-hint-weight: 400;

  /* Modál fejléc */
  --ebl-modal-title-size: 20px;
  --ebl-modal-title-gradient: var(--ebl-border-gradient, linear-gradient(90deg, #C560FF 0%, #FF8C27 100%));
  --ebl-modal-title-fallback: #C560FF;
  --ebl-modal-title-weight: 800;
  --ebl-modal-head-gap: 20px;
  --ebl-modal-close-size: 30px;
  --ebl-modal-close-bg: rgba(153, 110, 255, 0.20);

  /* Navbar / fejléc logó */
  --ebl-brand-title-gradient: var(--ebl-border-gradient, linear-gradient(90deg, #C560FF 0%, #FF8C27 100%));
  --ebl-brand-title-fallback: #C560FF;
  --ebl-brand-logo-height: 35px;
  /* Inter ExtraBold (800) cap-height / em – az EBL betűmagasság illesztéséhez */
  --ebl-brand-cap-ratio: 0.7275;
  --ebl-brand-ebl-size: calc(var(--ebl-brand-logo-height) / var(--ebl-brand-cap-ratio));
  --ebl-brand-title-size: 32px;
  --ebl-brand-title-weight: 800;
  --ebl-brand-ebl-color: #000000;
  --ebl-brand-subtitle-color: #808080;
  --ebl-brand-subtitle-size: 9px;
  --ebl-brand-subtitle-weight: 400;
  --ebl-brand-subtitle-tracking: 2.25px;
  --ebl-brand-support-size: 14px;
  --ebl-brand-support-color: #000000;
}

[data-bs-theme="dark"] {
  --ebl-modal-text: var(--text-primary, #F3F1FA);
  --ebl-modal-placeholder-color: var(--text-muted, #726F86);
  --ebl-modal-hint-color: var(--text-muted, #726F86);
  --ebl-brand-ebl-color: #FFFFFF;
  --ebl-brand-subtitle-color: var(--text-muted, #726F86);
  --ebl-brand-support-color: var(--text-primary, #F3F1FA);
  /* Fekete SVG ikonok világos megjelenítése sötét háttéren */
  --ebl-icon-filter: invert(1) grayscale(100%) brightness(200%);
}

/* Monokróm SVG ikonok – színes chip/pagináció ikonok kihagyva */
[data-bs-theme="dark"] img.bl-sort-icon,
[data-bs-theme="dark"] img.bm-sort-icon,
[data-bs-theme="dark"] img.bl-clock-icon,
[data-bs-theme="dark"] img.bm-clock-icon,
[data-bs-theme="dark"] img.bl-chevron,
[data-bs-theme="dark"] img.bl-dropdown-search-icon,
[data-bs-theme="dark"] img.ebl-mp__chevron,
[data-bs-theme="dark"] .bl-btn--primary img,
[data-bs-theme="dark"] .bl-billing-btn img,
[data-bs-theme="dark"] .bl-page-size-select img {
  filter: var(--ebl-icon-filter);
}

/* Közös modál fejléc – cím a fehér panel tetején */
.ebl-modal-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: var(--ebl-modal-head-gap);
}

.ebl-modal-head__title {
  margin: 0;
  padding-right: calc(var(--ebl-modal-close-size) + 10px);
  font-size: var(--ebl-modal-title-size);
  font-weight: var(--ebl-modal-title-weight);
  line-height: 1.25;
  word-wrap: break-word;
  /* Színátmenetes cím – ugyanaz a gradient, mint a modál keretén */
  background: var(--ebl-modal-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Régebbi böngészők – egyszínű lilás tartalék */
@supports not (background-clip: text) {
  .ebl-modal-head__title {
    color: var(--ebl-modal-title-fallback);
    -webkit-text-fill-color: currentColor;
  }
}

.ebl-modal-head__close {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--ebl-modal-close-size);
  height: var(--ebl-modal-close-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: var(--ebl-modal-close-bg);
  color: var(--text-primary, #1B1A22);
  cursor: pointer;
}

.ebl-modal-head__close:hover {
  filter: brightness(0.95);
}

/* Közös EBL logó tipográfia – navbar és bejelentkezési fejléc */
.brand-title,
.login-brand__title {
  font-weight: var(--ebl-brand-title-weight);
  font-size: var(--ebl-brand-title-size);
  line-height: 1.1;
  word-wrap: break-word;
  background: var(--ebl-brand-title-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

@supports not (background-clip: text) {
  .brand-title,
  .login-brand__title {
    color: var(--ebl-brand-title-fallback);
    -webkit-text-fill-color: currentColor;
  }
}

/* Navbar logó: AYCM SVG + EBL szöveg egy sorban */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}

.brand-aycm {
  display: block;
  height: var(--ebl-brand-logo-height);
  width: auto;
  flex-shrink: 0;
}

.brand-ebl {
  font-weight: var(--ebl-brand-title-weight);
  font-size: var(--ebl-brand-ebl-size);
  line-height: 1;
  color: var(--ebl-brand-ebl-color);
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-weight: var(--ebl-brand-subtitle-weight);
  font-size: var(--ebl-brand-subtitle-size);
  color: var(--ebl-brand-subtitle-color);
  text-transform: uppercase;
  letter-spacing: var(--ebl-brand-subtitle-tracking);
  line-height: 1.2;
  word-wrap: break-word;
}

.login-brand__subtitle {
  font-weight: var(--ebl-brand-subtitle-weight);
  font-size: 12px;
  color: #00000090;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  word-wrap: break-word;
}

/* Fejléc felső sor – logó blokk + ügyfélszolgálat blokk (függőlegesen középre zárva) */
.topbar-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin-bottom: 16px;
}

.topbar-brand-row .brand {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  line-height: 1.1;
  text-decoration: none;
}

.topbar-brand-row .brand-subtitle {
  margin-top: 4px;
}

.topbar-support {
  margin: 0;
  flex-shrink: 0;
  align-self: center;
  text-align: right;
  font-weight: 400;
  font-size: var(--ebl-brand-support-size);
  color: var(--ebl-brand-support-color);
  text-transform: uppercase;
  line-height: 1.21;
  word-wrap: break-word;
}

.topbar-support a {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.topbar-support a:hover {
  text-decoration: underline;
}

/* Mobil menü: Manager badge + hamburger a brand mellett; betekintő badge külön sorba */
.topbar-mobile-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 0;
}

.topbar-mobile-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

/* Brand lockup – reszponzív skála: logo és EBL szöveg együtt zsugorodik */
@media (max-width: 575.98px) {
  :root {
    --ebl-brand-logo-height: 28px;
    /* iOS Safari: <16px input focus zoom – közös modal input token */
    --ebl-modal-input-size: 16px;
  }

  .brand-lockup {
    gap: 8px;
  }

  .topbar-brand-row .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar-mobile-nav {
    flex-shrink: 0;
    margin-left: auto;
  }
}

@media (max-width: 399.98px) {
  :root {
    --ebl-brand-logo-height: 24px;
  }

  .brand-lockup {
    gap: 6px;
  }
}
