/* Ekran "e-book gotowy" po zakupie (js/ebook-ready.js): kasa jednej ksiazki i strona z linku
   w mailu. Hierarchia: jedna pomaranczowa akcja na ksiazke (pobierz), aplikacja jako krok
   drugi w obrysie, "wiecej ksiazek" zwyklym linkiem — zeby nic nie walczylo z pobieraniem. */
.er { text-align: left; padding: .25rem 0 1rem; }

.er-head { display: flex; align-items: center; gap: .75rem; margin: 0 0 .5rem; }
.er-check {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: #e6f6ec; color: #1f8a4c;
  display: inline-flex; align-items: center; justify-content: center;
}
.er-title {
  margin: 0; font-size: 1.45rem; font-weight: 700; line-height: 1.25;
  letter-spacing: -.3px; color: #1a1a2e;
}
.er-lead { margin: 0 0 1.25rem; color: #555; font-size: .95rem; line-height: 1.55; }

.er-books { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.er-book {
  display: grid; grid-template-columns: 60px minmax(0, 1fr);
  grid-template-areas: "cover text" "dl dl";
  gap: 1rem; align-items: center;
  padding: 1rem; background: #fff;
  border: 1px solid #e6e6ec; border-radius: 14px;
  box-shadow: 0 2px 12px rgba(26, 26, 46, .05);
}
.er-book--nocover { grid-template-columns: minmax(0, 1fr); grid-template-areas: "text" "dl"; }
.er-cover {
  grid-area: cover; display: block; width: 60px; height: 85px; object-fit: cover;
  border-radius: 4px; box-shadow: 0 1px 5px rgba(0, 0, 0, .2);
}
.er-book-text { grid-area: text; min-width: 0; }
.er-book-title {
  margin: 0; font-weight: 700; font-size: 1.05rem; line-height: 1.3;
  color: #1a1a2e; overflow-wrap: anywhere;
}
.er-book-meta { margin: .3rem 0 0; font-size: .8rem; line-height: 1.4; color: #777; }

.er-dl {
  grid-area: dl; display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.1rem; border-radius: 10px;
  background: #ea7131; color: #fff; font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; white-space: nowrap; transition: background .15s;
}
.er-dl:hover, .er-dl:focus-visible { background: #d5611f; color: #fff; text-decoration: none; }

.er-note { margin: .65rem 0 0; font-size: .8rem; line-height: 1.45; color: #888; }

.er-app {
  margin: 1.75rem 0 0; padding: 1.1rem 1.15rem 1.15rem;
  background: #fffaf4; border: 1px solid #f0dcc6; border-radius: 14px;
}
.er-app-title { margin: 0 0 .35rem; font-size: 1rem; font-weight: 700; line-height: 1.35; color: #1a1a2e; }
.er-app-body { margin: 0 0 .9rem; font-size: .88rem; line-height: 1.55; color: #5a4632; }
.er-app-btns { display: flex; flex-direction: column; gap: .5rem; }
/* Blok, nie flex: dlugi tytul zawija sie razem z ikona, zamiast odklejac ja od tekstu. */
.er-app-btn {
  display: block; box-sizing: border-box;
  min-height: 44px; padding: .65rem 1rem; border-radius: 10px;
  border: 1.5px solid #1a1a2e; background: #fff; color: #1a1a2e;
  font-weight: 700; font-size: .92rem; line-height: 1.25; text-align: center; text-decoration: none;
}
.er-app-btn svg { vertical-align: -4px; margin-right: .45rem; }
.er-app-btn:hover, .er-app-btn:focus-visible { background: #1a1a2e; color: #fff; text-decoration: none; }

.er-steps { counter-reset: er-step; margin: .95rem 0 0; padding: 0; list-style: none; }
.er-steps li {
  position: relative; padding-left: 1.65rem; margin: 0 0 .5rem;
  font-size: .85rem; line-height: 1.5; color: #5a4632;
}
.er-steps li:last-child { margin-bottom: 0; }
.er-steps li::before {
  content: counter(er-step); counter-increment: er-step;
  position: absolute; left: 0; top: .1rem;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: #f0dcc6; color: #5a4632;
  font-size: .72rem; font-weight: 700; line-height: 1.15rem; text-align: center;
}
/* Adres w osobnej linii: to on decyduje, czy kupujacy trafi na swoja polke. */
.er-steps strong { display: block; margin-top: .1rem; color: #1a1a2e; overflow-wrap: anywhere; }

.er-more { display: inline-block; margin-top: 1.5rem; color: #ea7131; font-weight: 600; text-decoration: none; }
.er-more:hover { text-decoration: underline; }

/* Na szerszym ekranie przycisk staje obok tytulu zamiast pod nim. */
@media (min-width: 560px) {
  .er-book { grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-areas: "cover text dl"; }
  .er-book--nocover { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "text dl"; }
}
