/* =====================================================
   PokéFriends v2.3.1 — Modern Pokémon GO Look (Light)
   ===================================================== */
* {
  box-sizing: border-box;
}

/* ---------- Kolory i motyw ---------- */
:root {
  --pf-bg: #f7fbff;
  --pf-card: #ffffff;
  --pf-shadow: 0 10px 26px rgba(13, 39, 80, 0.12);
  --pf-accent: #1e90ff; /* Mystic Blue (domyślny akcent UI) */
  --pf-text: #0f172a;
  --pf-sub: #475569;
  --pf-danger: #e11d48;
  --pf-gradient: linear-gradient(135deg, #e6f2ff 0%, #ffffff 50%, #eaf6ff 100%);
}

/* ---------- Layout główny ---------- */
#pokefriends-wrap {
  max-width: 1100px;
}

.pokef-section-title {
  margin: 24px 0 12px;
  font-size: 1.15rem;
  color: var(--pf-text);
}

.pokef-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.pokef-filters input,
.pokef-filters select {
  border: 1px solid #dbe6f5;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(13, 39, 80, 0.02);
}

/* ---------- Formularz dodawania ---------- */
.pokef-form {
  max-width: 460px;
  padding: 18px;
  border-radius: 16px;
  background: var(--pf-gradient);
  border: 1px solid #e6eef9;
  box-shadow: var(--pf-shadow);
}

.pokef-form h3 {
  margin: 0 0 10px;
  color: var(--pf-text);
}

.pokef-form input,
.pokef-form select {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid #dbe6f5;
  margin-bottom: 12px;
  background: #fff;
  color: var(--pf-text);
}

.pokef-form input:focus,
.pokef-form select:focus {
  outline: none;
  border-color: var(--pf-accent);
  box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.12);
}

.pokef-form .pf-hint {
  margin: -6px 0 10px;
  color: var(--pf-sub);
  font-size: 0.9rem;
}

.pokef-form button {
  background: linear-gradient(135deg, #1e90ff, #0073aa);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16, 112, 202, 0.25);
  transition: transform 0.15s, filter 0.15s;
}

.pokef-form button:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

#pokef-msg {
  margin-top: 8px;
  font-weight: 600;
}

/* ---------- Pola i suwaki ---------- */
.pf-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.pf-level-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #dbe6f5;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.pf-level-label {
  font-weight: 700;
  color: var(--pf-text);
}

.pf-level-badge {
  justify-self: end;
  font-weight: 800;
  background: #0b1220;
  color: #fff;
  padding: 6px 10px;
  border-radius: 10px;
}

.pf-level-range {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--pf-accent);
}

/* ---------- Pola i ikony „i” ---------- */
.pf-field {
  position: relative;
  display: flex;
  align-items: center;
}

.pf-field input,
.pf-field select,
.pf-fc-wrap input {
  width: 100%;
  padding-right: 38px !important;
}

.pf-field .pf-help,
.pf-fc-wrap .pf-help {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0b1220;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: help;
}

/* --- FIX: Friend Code wrapper --- */
.pf-fc-wrap {
  position: relative;
  display: block;
  margin-bottom: 12px;
}

/* Tooltip efekt */
.pf-help::after {
  content: attr(data-tip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: #0b1220;
  color: #fff;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.pf-help:hover::after,
.pf-help:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* ---------- Lista kart graczy ---------- */
.pokef-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.pgfc-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  border: 1px solid #e6eef9;
  box-shadow: var(--pf-shadow);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}

.pgfc-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 34px rgba(13, 39, 80, 0.16);
}

.pgfc-card h4 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: var(--pf-text);
  position: relative;
  z-index: 2;
}

.pgfc-card .small {
  font-size: 0.85rem;
  color: #3b82f6;
  margin-left: 6px;
  font-weight: 800;
}

.pgfc-card .team-label {
  font-weight: 800;
  color: var(--pf-text);
  opacity: 0.9;
  margin-bottom: 6px;
  z-index: 2;
  position: relative;
}

.pgfc-card .location {
  color: var(--pf-sub);
  margin-bottom: 8px;
  z-index: 2;
  position: relative;
}

.pgfc-card .code {
  background: #f2f7ff;
  border: 1px solid #e6eef9;
  padding: 8px 10px;
  border-radius: 10px;
  display: inline-block;
  font-weight: 800;
  letter-spacing: 1px;
  z-index: 2;
  position: relative;
}

/* Pasek po lewej w kolorach teamów */
.pgfc-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  border-radius: 16px 0 0 16px;
  background: linear-gradient(180deg, #93c5fd, #2563eb);
}

/* Ikony teamów */
.pgfc-card .team-icon {
  position: absolute;
  left: 65%;
  top: 45%;
  width: 170px;
  height: 170px;
  transform: translate(-50%, -50%);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.12));
  z-index: 1;
  transition: opacity 0.25s, transform 0.25s;
}

.pgfc-card:hover .team-icon {
  opacity: 0.18;
  transform: translate(-50%, -50%) scale(1.04);
}

.pgfc-card.team-Instinct .team-icon {
  background-image: url("icons/instinct.svg?v=4");
}
.pgfc-card.team-Mystic .team-icon {
  background-image: url("icons/mystic.svg?v=4");
}
.pgfc-card.team-Valor .team-icon {
  background-image: url("icons/valor.svg?v=4");
}

.pgfc-card.team-Instinct::before {
  background: linear-gradient(180deg, #fde047, #f59e0b);
}
.pgfc-card.team-Mystic::before {
  background: linear-gradient(180deg, #93c5fd, #2563eb);
}
.pgfc-card.team-Valor::before {
  background: linear-gradient(180deg, #fb7185, #ef4444);
}

/* ---------- Przyciski i toast ---------- */
.pf-copy-btn {
  margin-top: 8px;
  background: #0b1220;
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}

.pf-copy-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

#pf-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(50px);
  background: #0b1220;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

#pf-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}