/* The free wallpapers page, on top of app.css and about/about.css (header, footer, tape, headings, buttons). */

.wp-hero { max-width: 760px; margin: 0 auto; text-align: center; }
.wp-hero .ab-lead { margin: 18px auto 0; }

/* ---------------------------------------------------------------- the phones */

.wp-grid { margin-top: 50px; }
.wp-sec + .wp-sec { margin-top: 70px; }
.wp-sec-h { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 34px; font-size: 23px; font-weight: normal; color: var(--deep); }
.wp-sec-h small { padding: 2px 11px; border-radius: 999px; background: #fff3c9; color: #a5791a; font-size: 12.5px; }
.wp-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 48px 44px; }
.wp-card { width: 236px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.wp-phone {
  position: relative; display: block; width: 100%; aspect-ratio: 9 / 19.5; padding: 7px; border: 0; border-radius: 34px;
  background: #fff; cursor: pointer; container-type: inline-size; transform: rotate(var(--tilt, 0deg));
  box-shadow: 0 0 0 2px var(--sky-2), 0 22px 44px rgba(20, 70, 120, 0.22);
  transition: transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1), box-shadow 0.25s;
}
.wp-phone:hover, .wp-phone:focus-visible { transform: rotate(0deg) translateY(-6px) scale(1.02); box-shadow: 0 0 0 2px var(--blue), 0 30px 56px rgba(20, 70, 120, 0.28); }
.wp-phone > img:not(.wp-soon-cloud) { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 27px; background: var(--sky-1); }
.wp-phone .tape { top: -10px; }
/* how it looks as a lock screen: the camera pill and the clock, sized to the phone (cqw) */
.wp-island { position: absolute; top: 6.5cqw; left: 50%; width: 27cqw; height: 7.5cqw; margin-left: -13.5cqw; border-radius: 999px; background: #10161c; }
.wp-lock {
  position: absolute; left: 0; right: 0; top: 19cqw; display: flex; flex-direction: column; align-items: center; pointer-events: none;
  color: var(--clock, #fff); text-shadow: 0 1px 8px var(--clock-glow, rgba(30, 90, 150, 0.35));   /* each wallpaper's clock colour (build_wallpapers.clock_ink) */
}
.wp-lock small { font-size: 5.4cqw; letter-spacing: 0.3px; }
.wp-lock b { font-weight: normal; font-size: 24cqw; line-height: 1.05; letter-spacing: 0.5px; font-variant-numeric: tabular-nums; }
.wp-new {   /* on the phone's lower corner, clear of the clock */
  position: absolute; bottom: 22px; right: -12px; z-index: 2; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; letter-spacing: 1px;
  background: linear-gradient(180deg, #ffa3c2, var(--pink-deep)); color: #fff; box-shadow: 0 2px 0 #c95c86; transform: rotate(8deg);
}
.wp-info { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 8px; text-align: center; }
.wp-info b { font-weight: normal; font-size: 17px; color: var(--deep); line-height: 1.45; }
.wp-info span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wp-size i { font-style: normal; }
/* who made it: the artist (links to the post) or an AI label */
.wp-by, .wp-ai { display: inline-block; margin-top: 5px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; line-height: 1.6; text-decoration: none; }
.wp-info .wp-by { background: #fff0f5; color: #c95c86; font-size: 12.5px; }
.wp-info .wp-by:hover { background: #ffe1ea; }
.wp-ai { background: #ebe5fb; color: #6a58c6; }
.wp-info .wp-ai { font-size: 12.5px; color: #6a58c6; }

/* the next one, still on its way */
.wp-card.soon .wp-phone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: default;
  background: rgba(255, 255, 255, 0.55); box-shadow: none; outline: 3px dashed #9dd0f0; outline-offset: -3px;
}
.wp-card.soon .wp-phone:hover { transform: rotate(var(--tilt, 0deg)); }
.wp-soon-cloud { width: 46%; height: auto; opacity: 0.9; }
.wp-soon-q { margin-top: -6px; font-size: 40px; line-height: 1; color: var(--blue); }
.wp-failed { text-align: center; color: var(--danger); }

/* ---------------------------------------------------------------- the dos and don'ts */

.wp-rules { max-width: 640px; margin: 64px auto 0; padding: 18px 24px 20px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 2px var(--sky-2), 0 10px 26px rgba(44, 132, 198, 0.1); }
.wp-rules-h { margin: 0 0 10px; text-align: center; font-size: 18px; font-weight: normal; color: var(--deep); }
.wp-rules ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wp-rules li { position: relative; padding-left: 32px; font-size: 14.5px; line-height: 1.7; }
.wp-rules li::before {   /* a drawn tick (app.css --tick-yes) in a green circle, a cross in a pink one */
  content: ""; position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--tick-yes) center / 14px no-repeat, #d9f3e6;
}
.wp-rules li.no::before { background: var(--tick-no) center / 12px no-repeat, #ffe1ea; }

/* ---------------------------------------------------------------- how to set it */

.wp-how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; max-width: 880px; margin: 34px auto 0; }
.wp-how-card { position: relative; padding: 26px 24px 22px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 2px var(--sky-2), 0 12px 28px rgba(44, 132, 198, 0.12); }
.wp-how-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 20px; font-weight: normal; color: var(--deep); }
.wp-how-card .i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.wp-how-card ol { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.wp-how-card li { position: relative; padding-left: 34px; font-size: 14.5px; line-height: 1.7; counter-increment: s; }
.wp-how-card li::before {
  content: counter(s); position: absolute; left: 0; top: 1px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-size: 13px; background: var(--sky-1); color: var(--deep);
}

/* ---------------------------------------------------------------- the viewer */

.wp-view { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 16px; border: 0; background: transparent; overflow: hidden; }
.wp-view[open] { display: flex; align-items: center; justify-content: center; }
.wp-view::backdrop { background: rgba(20, 60, 100, 0.45); backdrop-filter: blur(4px); }
.wp-view-box {
  position: relative; display: flex; align-items: center; gap: 30px; max-width: 100%; max-height: 100%; padding: 22px 26px 22px 22px;
  border-radius: 24px; background: #fff; box-shadow: var(--shadow-lg, 0 24px 60px rgba(20, 70, 120, 0.3));
}
.wp-shot { flex: none; display: flex; justify-content: center; }
.wp-shot img {
  display: block; width: auto; height: min(calc(100dvh - 76px), 760px); max-width: 100%; object-fit: contain; border-radius: 22px;
  background: var(--sky-1) center / cover no-repeat; box-shadow: 0 0 0 6px #fff, 0 0 0 8px var(--sky-2);
}
.wp-side { width: 250px; display: flex; flex-direction: column; gap: 10px; }
.wp-side .wp-new { position: static; align-self: flex-start; transform: none; }
.wp-side h3 { margin: 0; padding-right: 30px; font-size: 24px; font-weight: normal; line-height: 1.35; color: var(--deep); }
.wp-credit { margin: 0; font-size: 13.5px; line-height: 1.7; color: var(--ink); }
.wp-credit a { color: #c95c86; }
.wp-credit .wp-ai { margin: 0 4px 0 0; }
.wp-meta { margin: 0; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wp-btns { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.wp-btns .btn { justify-content: center; }
.wp-btns .btn:not(.primary) { box-shadow: 0 0 0 1.5px var(--sky-2); }
.wp-hint { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.wp-view-rule { margin: 4px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.wp-round {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--sky-1); color: var(--deep); transition: background 0.15s, transform 0.15s;
}
.wp-round:hover:not(:disabled) { background: var(--sky-2); }
.wp-round:active:not(:disabled) { transform: scale(0.92); }
.wp-round:disabled { opacity: 0.4; cursor: default; }
.wp-round svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wp-x { position: absolute; top: 12px; right: 12px; z-index: 2; }
.wp-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 6px; font-size: 13px; color: var(--muted); }

@media (max-width: 820px) {
  .wp-how-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .wp-grid { margin-top: 40px; }
  .wp-sec + .wp-sec { margin-top: 54px; }
  .wp-sec-h { margin-bottom: 26px; font-size: 20px; }
  .wp-row { gap: 40px 20px; }
  .wp-card { width: calc(50% - 10px); max-width: 236px; }
  .wp-phone { border-radius: 28px; padding: 6px; }
  .wp-phone > img { border-radius: 22px; }
  .wp-new { right: -8px; bottom: 16px; font-size: 11.5px; }
  .wp-size > span { display: block; }
  .wp-size i { display: none; }
  .wp-rules { margin-top: 48px; padding: 16px 18px 18px; }
  /* the viewer fills the screen: the picture on top, the buttons under it */
  .wp-view { padding: 0; }
  .wp-view-box {
    flex-direction: column; align-items: stretch; gap: 10px; width: 100%; height: 100%; border-radius: 0;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  }
  .wp-shot { flex: 1; min-height: 0; }
  .wp-shot img { height: 100%; border-radius: 18px; box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--sky-2); }
  .wp-side { width: 100%; gap: 6px; align-items: center; text-align: center; }
  .wp-side .wp-new { display: none; }
  .wp-side h3 { padding: 0; font-size: 19px; }
  .wp-btns { flex-direction: row; width: 100%; margin-top: 2px; }
  .wp-btns .btn { flex: 1; }
  .wp-btns .btn.big { padding: 12px 16px; font-size: 16px; }
  .wp-view-rule { display: none; }
  .wp-credit { font-size: 12.5px; }
  .wp-x { top: 20px; right: 22px; background: rgba(255, 255, 255, 0.9); box-shadow: 0 2px 8px rgba(20, 70, 120, 0.2); }
}
