#nortia-loyalty-top-slot {
  position: relative;
  z-index: 90;
  display: flex;
  align-items: center;
  flex: 0 0 154px;
  width: 154px;
  min-width: 154px;
  max-width: 154px;
  margin: 0;
  padding: 0;
  float: none;
  box-sizing: border-box;
}

#nortia-loyalty-top-slot *,
#nortia-loyalty-top-slot *::before,
#nortia-loyalty-top-slot *::after,
.nortia-loyalty-popover.is-nortia-popover-portal,
.nortia-loyalty-popover.is-nortia-popover-portal * {
  box-sizing: border-box;
}

.nortia-loyalty-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 154px;
}

.nortia-loyalty-control::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
}

/* Header pill - bez zmian wymiarowych względem poprzedniej wersji. */
.nortia-loyalty-trigger {
  display: inline-flex;
  align-items: center;
  width: 154px;
  height: 42px;
  padding: 0 9px;
  border: 1px solid #d8eaf7;
  border-radius: 999px;
  background: linear-gradient(135deg, #f3f9fe 0%, #e8f4fc 100%);
  color: #102943;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.nortia-loyalty-trigger:hover,
.nortia-loyalty-trigger:focus {
  background: linear-gradient(135deg, #edf7fd 0%, #dfeffa 100%);
  border-color: #c9dfef;
  box-shadow: 0 5px 16px rgba(31, 106, 163, .09);
  color: #102943;
  text-decoration: none;
  outline: none;
}

.nortia-loyalty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: #0b78be;
}

.nortia-loyalty-icon svg,
.nortia-loyalty-status-icon svg,
.nortia-loyalty-stat-icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nortia-loyalty-points {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  color: #36506a;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.nortia-loyalty-points strong {
  color: #102943;
  font-size: 14px;
  font-weight: 800;
}

.nortia-loyalty-chevron {
  position: relative;
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  color: #0b78be;
}

.nortia-loyalty-chevron::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 1px;
  width: 6px;
  height: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.nortia-loyalty-guest-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  color: #102943;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}

.nortia-loyalty-guest-arrow {
  margin-left: auto;
  color: #0b78be;
  font-size: 19px;
  line-height: 1;
}

/* Popup: DOKŁADNIE poprzedni gabaryt 320px / 17px / 14px. */
.nortia-loyalty-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 320px;
  padding: 17px;
  border: 1px solid #e0e7ed;
  border-radius: 14px;
  background: #fff;
  color: #132b48;
  font-family: inherit;
  box-shadow: 0 18px 46px rgba(19, 38, 58, .16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity .14s ease, visibility .14s ease, transform .14s ease;
}

.nortia-loyalty-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 34px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #e0e7ed;
  border-top: 1px solid #e0e7ed;
  transform: rotate(45deg);
}

.nortia-loyalty-control:hover .nortia-loyalty-popover,
.nortia-loyalty-control:focus-within .nortia-loyalty-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nortia-loyalty-popover-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 44px;
}

.nortia-loyalty-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e8f5fd;
  color: #0879c0;
}

.nortia-loyalty-status-icon svg {
  width: 24px;
  height: 24px;
}

.nortia-loyalty-status-icon--silver {
  background: #e9eff4;
  color: #61798c;
}

.nortia-loyalty-status-icon--gold {
  background: #f8efd9;
  color: #9c6d13;
}

.nortia-loyalty-status-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.nortia-loyalty-status-copy span {
  color: #59748e;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nortia-loyalty-status-copy strong {
  margin-top: 3px;
  color: #173a60;
  font-size: 18px;
  line-height: 1;
  font-weight: 850;
}

.nortia-loyalty-status-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 42px;
}

.nortia-loyalty-progress-value {
  color: #173a60;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.nortia-loyalty-max-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f8efd9;
  color: #7b5817;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

.nortia-loyalty-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin: 0 0 12px 55px;
}

.nortia-loyalty-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eff4;
}

.nortia-loyalty-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #168ad0, #0877bf);
}

.nortia-loyalty-popover--silver .nortia-loyalty-progress span {
  background: linear-gradient(90deg, #9caebb, #718798);
}

.nortia-loyalty-popover--gold .nortia-loyalty-progress span {
  background: linear-gradient(90deg, #168ad0, #0877bf);
}

.nortia-loyalty-progress-value--bar {
  font-size: 10px;
}

.nortia-loyalty-max-copy {
  margin: -7px 0 9px 55px;
  color: #7a8792;
  font-size: 9.5px;
  line-height: 1.3;
}

.nortia-loyalty-divider {
  height: 1px;
  margin: 0;
  background: #edf0f3;
}

.nortia-loyalty-stats {
  padding: 7px 0;
  border-bottom: 1px solid #edf0f3;
}

.nortia-loyalty-stat-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 36px;
  color: #46535e;
}

.nortia-loyalty-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #edf7ff;
  color: #0b80ca;
}

.nortia-loyalty-stat-icon svg {
  width: 14px;
  height: 14px;
}

.nortia-loyalty-stat-label {
  min-width: 0;
  color: #46535e;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 400;
}

.nortia-loyalty-stat-value {
  color: #17232d;
  font-size: 12.5px;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.nortia-loyalty-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 11px;
  color: #7a8792;
  font-size: 11.5px;
}

.nortia-loyalty-next strong {
  color: #263746;
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.nortia-loyalty-account-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 40px;
  margin-top: 11px;
  padding: 0 12px;
  border-radius: 7px;
  background: linear-gradient(135deg, #158af0 0%, #0876da 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: background .15s ease;
}

.nortia-loyalty-account-link:hover,
.nortia-loyalty-account-link:focus {
  background: linear-gradient(135deg, #0f7fe2 0%, #0669c7 100%);
  color: #fff;
  text-decoration: none;
  outline: none;
}

.nortia-loyalty-account-arrow {
  font-size: 19px;
  line-height: 1;
  font-weight: 400;
}

/* Desktop header geometry pozostaje jak w bieżącym motywie. */
@media (min-width: 1200px) {
  #header .header-top .nortia-force-header-row > .nortia-force-search {
    flex: 0 1 560px;
    width: 560px;
    max-width: 560px;
    min-width: 260px;
    margin: 0;
  }

  #header .header-top .nortia-force-header-row > .nortia-force-user {
    margin-left: auto;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  #nortia-loyalty-top-slot {
    display: none;
  }
}

.nortia-loyalty-popover.is-nortia-popover-portal {
  position: fixed;
  right: auto;
  top: auto;
  z-index: 2147483000;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

@media (max-width: 575.98px) {
  .nortia-loyalty-popover {
    width: min(320px, calc(100vw - 16px));
  }

  .nortia-loyalty-popover::before {
    right: 28px;
  }
}
