/* Flipbook maker templates — single studio preview */

body.pf-templates-page {
  background: #f6f7f9;
}

body.pf-templates-page #page.page {
  background: #f6f7f9;
}

body.pf-templates-page .container-xxl {
  max-width: 1600px;
}

.pf-tpl-hero {
  padding: 5.25rem 0 0.55rem;
  background:
    radial-gradient(ellipse 70% 80% at 50% -20%, rgba(15, 188, 73, 0.1), transparent 55%),
    linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
}

.pf-tpl-hero-inner {
  max-width: 48rem;
  margin: 0 auto;
  text-align: center;
}

.pf-tpl-hero-eyebrow {
  margin: 0 0 0.3rem;
  color: var(--green, #0fbc49);
  font-family: var(--main-font, "Roboto", sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pf-tpl-hero-title {
  margin: 0 0 0.3rem;
  font-family: var(--main-font, "Roboto", sans-serif);
  color: #111111;
  font-size: clamp(1.65rem, 2.6vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.pf-tpl-hero-lead {
  margin: 0;
  font-family: var(--main-font, "Roboto", sans-serif);
  color: #3f4652;
  font-size: 0.95rem;
  line-height: 1.35;
  white-space: nowrap;
}

.pf-tpl-main {
  padding: 0.25rem 0 3rem;
}

.pf-tpl-studio {
  display: grid;
  grid-template-columns: minmax(13.5rem, 15.5rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
  min-height: min(780px, calc(100vh - 9.25rem));
}

.pf-tpl-picker {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  height: 100%;
  min-height: 0;
}

.pf-tpl-pick {
  position: relative;
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  flex: 1 1 0;
  min-height: 0;
  margin: 0;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.pf-tpl-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pf-tpl-pick:hover {
  border-color: rgba(15, 188, 73, 0.35);
}

.pf-tpl-pick.is-active,
.pf-tpl-pick:has(input:checked) {
  border-color: rgba(15, 188, 73, 0.55);
  box-shadow: 0 0 0 2px rgba(15, 188, 73, 0.18);
  background: #f7fdf9;
}

.pf-tpl-pick-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 10px;
  background: #f1f5f9;
  overflow: hidden;
  flex-shrink: 0;
}

.pf-tpl-pick-ico img {
  display: block;
  width: 2.85rem;
  height: auto;
  max-height: 2.85rem;
  object-fit: contain;
}

.pf-tpl-pick-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.pf-tpl-pick-title {
  font-family: var(--main-font, "Roboto", sans-serif);
  color: #111111;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.pf-tpl-pick-tag {
  font-family: var(--main-font, "Roboto", sans-serif);
  color: #64748b;
  font-size: 0.76rem;
  line-height: 1.25;
}

.pf-tpl-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 36px rgba(17, 24, 39, 0.05);
}

.pf-tpl-stage-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  flex: 0 0 auto;
}

.pf-tpl-stage-meta {
  flex: 1 1 14rem;
  min-width: 0;
  max-width: 46rem;
}

.pf-tpl-stage-eyebrow {
  margin: 0 0 0.2rem;
  color: var(--green, #0fbc49);
  font-family: var(--main-font, "Roboto", sans-serif);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pf-tpl-stage-title {
  margin: 0 0 0.25rem;
  font-family: var(--main-font, "Roboto", sans-serif);
  color: #111111;
  font-size: clamp(1.2rem, 1.7vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.pf-tpl-stage-lead {
  margin: 0;
  font-family: var(--main-font, "Roboto", sans-serif);
  color: #3f4652;
  font-size: 0.9rem;
  line-height: 1.4;
}

.pf-tpl-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  flex: 0 0 auto;
}

.pf-tpl-host.pf-template-flipbook-host {
  flex: 1 1 auto;
  min-height: 0;
  background: #ececec;
}

.pf-tpl-host > .pf-template-flipbook-wrap {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.pf-tpl-studio-empty {
  margin: 2rem 0;
  text-align: center;
  color: #64748b;
}

@media (max-width: 1199px) {
  .pf-tpl-studio {
    grid-template-columns: minmax(12.5rem, 14.5rem) minmax(0, 1fr);
    min-height: min(700px, calc(100vh - 9rem));
  }
}

@media (max-width: 991px) {
  .pf-tpl-hero {
    padding: 5.1rem 0 0.55rem;
  }

  .pf-tpl-hero-lead {
    white-space: normal;
  }

  .pf-tpl-studio {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    min-height: 0;
  }

  .pf-tpl-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    height: auto;
  }

  .pf-tpl-pick {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 0.7rem 0.4rem;
    gap: 0.4rem;
    flex: none;
    min-height: 0;
  }

  .pf-tpl-pick-ico {
    width: 3.75rem;
    height: 3.75rem;
  }

  .pf-tpl-pick-ico img {
    width: 3.1rem;
    max-height: 3.1rem;
  }

  .pf-tpl-pick-tag {
    display: none;
  }

  .pf-tpl-host.pf-template-flipbook-host {
    min-height: 420px;
  }

  .pf-tpl-host > .pf-template-flipbook-wrap {
    min-height: 420px;
  }
}

@media (max-width: 767px) {
  .pf-tpl-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pf-tpl-stage-head {
    padding: 0.85rem 1rem;
  }

  .pf-tpl-stage-actions {
    width: 100%;
  }

  .pf-tpl-stage-actions .btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .pf-tpl-main {
    padding-bottom: 2.75rem;
  }
}

@media (max-width: 480px) {
  .pf-tpl-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
