/* ================================================
   POLEĆ ZNAJOMEMU — mały pasek nad podsumowaniem zamówienia (+ Moje konto)
   Zwinięty: jedna linijka z kodem i „Udostępnij”. Rozwinięty: drobne przyciski
   WhatsApp / Gmail / SMS / e-mail / Facebook / kopiuj.
   Kolory jak strona podziękowania: cyjan #00C8FF | złoty #C8CC00 | czarny #0a0a0a
   Prefiks pgref- (pg- jest zajęty przez szablon sklepu). Selektory z „html body”,
   bo motyw i Dodatkowe CSS stylizują globalnie button / summary / code / a.
   ================================================ */

html body .pgref-box {
  display: block;
  box-sizing: border-box;
  margin: 0 0 18px;
  padding: 0;
  background: #fff;
  border: 1px solid #cdeffb;
  border-radius: 12px;
  color: #0a0a0a;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}

html body .pgref-box *,
html body .pgref-rewards * {
  box-sizing: border-box;
}

html body .pgref-box[open],
html body .pgref-box:hover {
  border-color: #00C8FF;
  box-shadow: 0 2px 10px rgba(0, 200, 255, 0.10);
}

/* --- Pasek (zwinięty) --- */
html body .pgref-box > summary.pgref-bar {
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0 !important;
  padding: 9px 12px !important;
  background: linear-gradient(90deg, #f3fcff 0%, #fdfff3 100%) !important;
  border: 0 !important;
  list-style: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

html body .pgref-box > summary.pgref-bar::-webkit-details-marker { display: none; }
html body .pgref-box > summary.pgref-bar::marker { content: ""; }

html body .pgref-box > summary.pgref-bar:focus-visible {
  outline: 2px solid #0a0a0a;
  outline-offset: -2px;
}

html body .pgref-icon {
  flex: 0 0 auto;
  font-size: 18px;
  line-height: 1;
}

html body .pgref-bar-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  color: #0a0a0a;
}

html body .pgref-bar-text strong {
  font-weight: 700;
}

html body .pgref-bar-sub {
  margin-left: 4px;
  color: #6b6b6b;
  white-space: nowrap;
}

html body .pgref-box code.pgref-code,
html body .pgref-rewards code.pgref-code {
  display: inline-block;
  margin: 0 !important;
  padding: 3px 9px !important;
  background: #fff !important;
  border: 1.5px dashed #00C8FF !important;
  border-radius: 7px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  line-height: 1.5 !important;
  color: #0a0a0a !important;
  white-space: nowrap;
}

html body .pgref-bar-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  background: #00C8FF;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: #0a0a0a;
  white-space: nowrap;
}

html body .pgref-chevron {
  transition: transform .2s ease;
}

html body .pgref-box[open] .pgref-chevron {
  transform: rotate(180deg);
}

/* --- Panel (rozwinięty) --- */
html body .pgref-panel {
  padding: 10px 12px 12px;
  border-top: 1px solid #e3f6fd;
}

html body .pgref-box .pgref-text,
html body .pgref-rewards .pgref-text {
  margin: 0 0 9px !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  font-size: 12.5px !important;
  line-height: 1.45 !important;
  color: #666 !important;
}

html body .pgref-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

html body .pgref-box .pgref-link {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: 0 !important;
  padding: 4px 11px !important;
  background: #fff !important;
  border: 1px solid #dcdcdc !important;
  border-radius: 999px !important;
  font-family: inherit !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  color: #222 !important;
  text-decoration: none !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  cursor: pointer;
  box-shadow: none !important;
  transition: border-color .15s ease, background-color .15s ease;
}

html body .pgref-box .pgref-link:hover {
  border-color: #00C8FF !important;
  background: #f3fcff !important;
}

html body .pgref-box .pgref-link:focus-visible {
  outline: 2px solid #0a0a0a;
  outline-offset: 1px;
}

html body .pgref-box .pgref-link[hidden],
html body .pgref-rewards .pgref-btn[hidden] {
  display: none !important;
}

html body .pgref-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #999;
}

html body .pgref-link--whatsapp .pgref-dot { background: #25D366; }
html body .pgref-link--gmail .pgref-dot    { background: #EA4335; }
html body .pgref-link--sms .pgref-dot      { background: #34B7F1; }
html body .pgref-link--email .pgref-dot    { background: #8a8a8a; }
html body .pgref-link--facebook .pgref-dot { background: #1877F2; }

html body .pgref-box .pgref-link.is-copied,
html body .pgref-rewards .is-copied {
  background: #f8fbd6 !important;
  border-color: #C8CC00 !important;
}

html body .pgref-box .pgref-foot {
  margin: 9px 0 0 !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  font-size: 12px !important;
  color: #888 !important;
}

html body .pgref-box .pgref-foot a {
  color: #0099cc !important;
  font-weight: 600;
}

/* Moje konto: klient jeszcze bez zamówienia (zwykła ramka, nie pasek). */
html body .pgref-box--empty {
  padding: 10px 12px;
}

html body .pgref-box--empty .pgref-text {
  margin: 0 !important;
}

/* --- Moje konto: lista nagród --- */
html body .pgref-rewards {
  margin: 0 0 24px;
}

html body .pgref-rewards .pgref-rewards-title {
  margin: 0 0 8px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0a0a0a !important;
}

html body .pgref-reward-list {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

html body .pgref-reward {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin: 0 0 6px !important;
  padding: 8px 12px !important;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  font-size: 13px;
  list-style: none !important;
}

html body .pgref-reward-value {
  font-weight: 700;
}

html body .pgref-reward-state {
  margin-left: auto;
  font-size: 12px;
  color: #2e7d32;
}

html body .pgref-reward--used,
html body .pgref-reward--expired {
  opacity: 0.55;
}

html body .pgref-reward--used .pgref-reward-state,
html body .pgref-reward--expired .pgref-reward-state {
  color: #777;
}

html body .pgref-rewards .pgref-btn {
  display: inline-flex !important;
  align-items: center;
  min-height: 28px;
  margin: 0 !important;
  padding: 3px 11px !important;
  background: #fff !important;
  border: 1px solid #00C8FF !important;
  border-radius: 999px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  color: #0a0a0a !important;
  text-transform: none !important;
  cursor: pointer;
  box-shadow: none !important;
}

/* Wąski telefon: kod i przycisk schodzą do drugiej linii, równo pod tekstem. */
@media (max-width: 420px) {
  html body .pgref-box > summary.pgref-bar {
    display: grid !important;
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  html body .pgref-icon      { grid-column: 1; grid-row: 1; }
  html body .pgref-bar-text  { grid-column: 2 / 4; grid-row: 1; }
  html body .pgref-box code.pgref-code { grid-column: 2; grid-row: 2; justify-self: start; }
  html body .pgref-bar-btn   { grid-column: 3; grid-row: 2; }
}
