/* Strona oceny dla klienta firmy: /o/:id (i podgląd w generatorze: /ocena?podglad=1). */

.app {
  min-height: 100dvh;
}

/* ---------------------------------------------------------------- */
/* Nagłówek                                                           */
/* ---------------------------------------------------------------- */

.badge {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 50%;
  background: var(--dark);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.who {
  min-width: 0;
}

.company {
  display: block;
  overflow: hidden;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.art {
  display: none;
}

/* ---------------------------------------------------------------- */
/* Gwiazdki                                                           */
/* ---------------------------------------------------------------- */

.rate-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: clamp(14px, 2.6vh, 22px);
}

.score {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  text-align: center;
}

.score-num {
  display: flex;
  align-items: baseline;
  margin: 0;
  font-size: clamp(64px, 17vh, 150px);
  font-weight: 300;
  line-height: 0.92;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s;
}

.score-num small {
  margin-left: 0.06em;
  color: var(--ink-3);
  font-size: 0.26em;
  font-weight: 400;
  letter-spacing: 0;
}

.is-empty .score-num {
  color: var(--line-2);
}

.score-label {
  margin: clamp(4px, 1.2vh, 12px) 0 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 500;
}

.is-empty .score-label {
  color: var(--ink-3);
}

/* Linijka z kreskami jak w referencji (ćwiczenie oddechowe) - wypełnia się do oceny. */
.ticks {
  --fill: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: clamp(22px, 5vh, 40px);
  padding: 0 4px;
  transform: skewX(-18deg);
}

.ticks span {
  width: 1.5px;
  height: 62%;
  border-radius: 2px;
  background: var(--line-2);
  transition: background 0.25s, height 0.25s;
}

.ticks span:nth-child(5n + 1) {
  height: 100%;
}

.ticks span.on {
  background: var(--orange);
}

.stars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(6px, 2vw, 10px);
  margin: 0;
  padding: 0;
  border: 0;
}

.star {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(50px, 9vh, 72px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
  color: var(--ink-3);
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}

.star input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.star .i {
  width: 30px;
  height: 30px;
  stroke-width: 1.4;
  transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1), fill 0.18s;
}

.star.on {
  border-color: var(--orange);
  background: var(--orange);
  color: #fff;
}

.star.on .i {
  fill: #fff;
}

.star.pop .i {
  transform: scale(1.18);
}

.star:has(input:focus-visible) {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

@media (hover: hover) {
  .stars:hover .star.preview:not(.on) {
    border-color: #ffc3a8;
    background: var(--orange-soft);
    color: var(--orange);
  }
}

.star:active {
  transform: scale(0.95);
}

.foot {
  margin: 0;
  text-align: center;
  font-size: 12.5px;
  font-weight: 500;
}

.foot a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-3);
  text-decoration: none;
}

.foot .dh-mark {
  width: 17px;
  height: 12px;
}

.foot a:hover {
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- */
/* Niska ocena                                                        */
/* ---------------------------------------------------------------- */

.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
}

.rating-chip .mini {
  display: inline-flex;
  gap: 1px;
  color: var(--line-2);
}

.rating-chip .mini .i {
  width: 15px;
  height: 15px;
  stroke-width: 1.8;
}

.rating-chip .mini .on {
  color: var(--orange);
  fill: var(--orange);
}

.note-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

.note-field {
  flex: 1;
  min-height: 0;
}

.note-text {
  flex: 1;
  min-height: 96px;
  height: 100%;
}

.note-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.note-row .input {
  min-height: 50px;
  padding: 12px 14px;
  font-size: 15px;
}

.turnstile:empty {
  display: none;
}

.note-card .hint {
  padding: 0 6px 4px;
}

.site-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
}

.site-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange);
}

.site-icon .i {
  width: 32px;
  height: 32px;
}

.site-text {
  max-width: 28ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
}

.site-host {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--dark);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  word-break: break-all;
}

.public-link {
  align-self: center;
}

/* ---------------------------------------------------------------- */
/* Podziękowania                                                      */
/* ---------------------------------------------------------------- */

.thanks-art {
  position: relative;
}

.thanks-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.s-thanks .thanks-text {
  text-align: center;
}

.s-thanks .title {
  font-size: clamp(34px, 10vw, 52px);
}

.s-thanks .sub {
  margin: 10px auto 0;
}

.s-thanks .top .brand-logo {
  height: 16px;
}

/* Podgląd w ramce telefonu w generatorze: miejsce na udawany pasek statusu. */
.podglad .screen {
  padding-top: 54px;
}

/* Niskie ekrany (Safari z paskami): mniej powietrza, żeby nic nie wyjechało pod pasek. */
@media (max-height: 600px) {
  .screen {
    gap: 10px;
  }

  .s-low .sub {
    display: none;
  }

  .note-text {
    min-height: 72px;
  }
}

/* ---------------------------------------------------------------- */
/* Desktop: ilustracja po lewej, karta oceny po prawej.               */
/* ---------------------------------------------------------------- */

@media (min-width: 900px) {
  body {
    background:
      radial-gradient(70% 70% at 0% 0%, var(--wash) 0%, rgb(248 221 204 / 0) 60%),
      var(--bg);
  }

  .s-rate:not([hidden]),
  .s-low:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    grid-template-rows: auto auto auto 1fr auto;
    column-gap: clamp(40px, 6vw, 96px);
    row-gap: 18px;
    align-content: center;
    max-width: 1120px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 48px;
  }

  .s-rate > .top,
  .s-low > .top {
    grid-area: 1 / 1;
  }

  .s-rate > .title,
  .s-low > .title {
    grid-area: 2 / 1;
    max-width: 12ch;
    font-size: clamp(48px, 5.2vw, 72px);
  }

  .s-low > .sub {
    grid-area: 3 / 1;
    display: block;
    margin: 0;
    font-size: 17px;
  }

  .art-desktop {
    display: block;
    grid-area: 4 / 1 / 6 / 2;
    width: auto;
    max-width: 100%;
    height: clamp(220px, 38vh, 380px);
    align-self: end;
    object-fit: contain;
    object-position: left bottom;
  }

  .s-rate > .rate-card,
  .s-low > .note-card,
  .s-low > .site-card {
    grid-area: 1 / 2 / 5 / 3;
    min-height: 460px;
  }

  .s-rate > .bottom,
  .s-low > .bottom {
    grid-area: 5 / 2;
  }

  .score-num {
    font-size: 140px;
  }

  .star {
    height: 70px;
  }

  .s-thanks:not([hidden]) {
    max-width: 560px;
    margin: 0 auto;
  }
}
