/* WROOMER.PL — style modułu „Udostępnij w grupie”.
   Wszystko jest zaczepione o .wsg / .wsg-admin, więc nie rusza istniejącej strony.
   Paleta zgodna z wroomer.pl: tło #101010, akcent #facc15. */

.wsg,
.wsg * {
  box-sizing: border-box;
}

.wsg {
  --wsg-bg: #151515;
  --wsg-bg-soft: #1b1b1b;
  --wsg-border: #2a2a2a;
  --wsg-text: #f5f5f5;
  --wsg-muted: #b9b9b9;
  --wsg-accent: #facc15;
  --wsg-accent-ink: #111;
  --wsg-ok: #4ade80;
  --wsg-warn: #fb923c;

  max-width: 620px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--wsg-border);
  border-radius: 14px;
  background: var(--wsg-bg);
  color: var(--wsg-text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.wsg__title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
}

.wsg__hint {
  margin: 0;
  color: var(--wsg-muted);
  font-size: 13px;
}

.wsg__steps {
  margin: 12px 0;
  padding: 0 0 0 20px;
  color: var(--wsg-muted);
  font-size: 13px;
}

.wsg__steps li {
  margin: 2px 0;
}

.wsg__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.wsg__btn {
  appearance: none;
  border: 1px solid var(--wsg-border);
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--wsg-bg-soft);
  color: var(--wsg-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}

.wsg__btn:hover {
  border-color: #3a3a3a;
  background: #222;
}

.wsg__btn:active {
  transform: translateY(1px);
}

.wsg__btn:focus-visible {
  outline: 2px solid var(--wsg-accent);
  outline-offset: 2px;
}

.wsg__btn--primary {
  background: var(--wsg-accent);
  border-color: var(--wsg-accent);
  color: var(--wsg-accent-ink);
}

.wsg__btn--primary:hover {
  background: #ffd633;
  border-color: #ffd633;
}

.wsg__btn--ghost {
  background: transparent;
}

.wsg__status {
  margin: 12px 0 0;
  min-height: 1.4em;
  color: var(--wsg-muted);
  font-size: 12.5px;
}

.wsg__status[data-tone="ok"] { color: var(--wsg-ok); }
.wsg__status[data-tone="warn"] { color: var(--wsg-warn); }

.wsg__done-row {
  margin-top: 10px;
}

.wsg__note {
  margin: 8px 0 0;
  color: var(--wsg-muted);
  font-size: 12px;
}

@media (max-width: 480px) {
  .wsg {
    padding: 14px;
  }
  .wsg__actions .wsg__btn {
    flex: 1 1 100%;
  }
}

/* ------------------------------ widok admina ------------------------------ */

.wsg-admin {
  --wsg-admin-bg: #151515;
  --wsg-admin-border: #2a2a2a;
  color: #f5f5f5;
  font: 13px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.wsg-admin__table {
  width: 100%;
  border-collapse: collapse;
}

.wsg-admin__table th,
.wsg-admin__table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--wsg-admin-border);
  text-align: left;
  vertical-align: middle;
}

.wsg-admin__table th {
  color: #b9b9b9;
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.wsg-admin__badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #262626;
  color: #d6d6d6;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.wsg-admin__badge--done {
  background: rgba(74, 222, 128, .14);
  color: #4ade80;
}

.wsg-admin__badge--seller {
  background: rgba(250, 204, 21, .14);
  color: #facc15;
}

.wsg-admin__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wsg-admin__actions .wsg__btn {
  padding: 7px 10px;
  font-size: 12px;
}

.wsg-admin__preview {
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed var(--wsg-admin-border);
  border-radius: 12px;
  background: #111;
}

.wsg-admin__preview pre {
  margin: 8px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #e6e6e6;
  font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* -------------------------------- modal -------------------------------- */

.wsg-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .72);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.wsg-modal {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  background: #151515;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  outline: none;
}

.wsg-modal .wsg {
  margin: 0;
  border: 0;
  border-radius: 16px;
  max-width: none;
}

.wsg-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #b9b9b9;
  font: 22px/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  cursor: pointer;
}

.wsg-modal__close:hover {
  background: #262626;
  color: #fff;
}

.wsg-modal__close:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: 2px;
}

.wsg-modal .wsg__head {
  padding-right: 32px;
}

@media (max-width: 480px) {
  .wsg-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .wsg-modal {
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
  }

  .wsg-modal .wsg {
    border-radius: 16px 16px 0 0;
  }
}
