/* Bookzooka — styles that must load even before the viewer starts */

.fbs-shelf {
  display: grid;
  grid-template-columns: repeat(var(--fbs-cols, 3), minmax(0, 1fr));
  gap: 32px 24px;
  align-items: end;
  margin: 1.5em 0;
}
.fbs-shelf-item {
  text-align: center;
}
@media (max-width: 782px) {
  .fbs-shelf {
    grid-template-columns: repeat(min(var(--fbs-cols, 3), 2), minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .fbs-shelf {
    grid-template-columns: 1fr;
  }
}

.fbs-gate {
  --fbs-gate-accent: #6d5efc;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  min-height: 320px;
  padding: 40px 24px;
  margin: 1.5em 0;
  border-radius: 18px;
  background: radial-gradient(120% 100% at 50% 0%, #fbfbfd 0%, #f0f1f6 100%);
  border: 1px solid rgba(20, 22, 28, .08);
  color: #1a1c22;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* Text version under a book */
.fbs-textver {
  box-sizing: border-box;
  max-width: 760px;
  margin: 28px auto;
  padding: 0 16px;
  font-size: 16px;
  line-height: 1.7;
}
.fbs-textver summary {
  cursor: pointer;
  padding: 12px 16px;
  border: 1px solid rgba(20, 22, 28, .14);
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
}
.fbs-textver-body {
  text-align: left;
}
.fbs-textver summary:hover {
  border-color: rgba(20, 22, 28, .32);
}
.fbs-textver-body {
  padding-top: 18px;
}
.fbs-textver-body h2 {
  margin: 0 0 14px;
  font-size: 1.5em;
  line-height: 1.25;
}
.fbs-textver-body h3 {
  margin: 1.6em 0 .5em;
  font-size: .8em;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .65;
}
.fbs-textver-body p {
  margin: 0 0 1em;
}

/* [bookzooka-library] */
.fbs-library {
  margin: 1.5em 0;
}
.fbs-library-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.fbs-library-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fbs-library-chips button {
  padding: 7px 14px;
  border: 1px solid rgba(20, 22, 28, .14);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
}
.fbs-library-chips button:hover {
  border-color: rgba(20, 22, 28, .36);
}
.fbs-library-chips button.is-active {
  background: var(--fbs-gate-accent, #6d5efc);
  border-color: transparent;
  color: #fff;
}
.fbs-library-search {
  box-sizing: border-box;
  flex: 0 1 260px;
  width: 260px;
  max-width: 100%;
  height: 40px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid rgba(20, 22, 28, .18);
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
}
.fbs-library-grid {
  display: grid;
  grid-template-columns: repeat(var(--fbs-cols, 3), minmax(0, 1fr));
  gap: 32px 24px;
  align-items: start;
}
.fbs-library-item {
  min-width: 0;
  text-align: center;
  transition: transform .25s cubic-bezier(.2, .7, .2, 1);
}
.fbs-library-item:hover {
  transform: translateY(-4px);
}
.fbs-library-item .book-thumbnail img {
  width: 160px;
  max-width: 100%;
  height: auto;
}
.fbs-library .fbs-library-title {
  margin: 12px 0 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}
.fbs-library-item .fbs-gate {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 20px 14px;
}
.fbs-library-item .fbs-gate-icon {
  width: 44px;
  height: 44px;
  margin-bottom: 10px;
}
.fbs-library-item .fbs-gate-title {
  font-size: 15px;
}
.fbs-library-item .fbs-gate-text {
  display: none;
}
.fbs-library-item .fbs-gate-btn {
  height: auto;
  min-height: 0;
  margin-top: 10px;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.3;
}
.fbs-library-item[hidden] {
  display: none;
}
.fbs-library-none {
  padding: 28px 0;
  text-align: center;
  opacity: .7;
}
@media (max-width: 782px) {
  .fbs-library-grid {
    grid-template-columns: repeat(min(var(--fbs-cols, 3), 2), minmax(0, 1fr));
  }
  .fbs-library-search {
    flex: 1 1 100%;
    width: 100%;
    margin-left: 0;
  }
}

/* On a book's own page the message is a centred card, not a full-width band. */
.fbs-single-book > .fbs-gate {
  width: auto;
  max-width: 640px;
  margin: 48px auto;
}
@media (max-width: 680px) {
  .fbs-single-book > .fbs-gate {
    margin: 24px 16px;
    padding: 32px 20px;
  }
}
.fbs-gate--compact {
  display: inline-flex;
  min-height: 0;
  padding: 22px 20px;
  max-width: 280px;
  margin: 0;
}
.fbs-gate-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fbs-gate-accent);
  background: color-mix(in srgb, var(--fbs-gate-accent) 12%, transparent);
}
.fbs-gate-title {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.01em;
}
.fbs-gate-text {
  margin: 0;
  max-width: 420px;
  font-size: 14.5px;
  line-height: 1.5;
  color: #5d6270;
}
.fbs-gate-btn, .fbs-gate-btn:visited {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--fbs-gate-accent);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--fbs-gate-accent) 35%, transparent);
  transition: transform .15s, box-shadow .15s;
}
.fbs-gate-btn:hover, .fbs-gate-btn:focus {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--fbs-gate-accent) 42%, transparent);
}
/* Elementor editor preview of the FlipBook widget */
.fbs-el-preview {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px dashed #c9cbd6;
  border-radius: 14px;
  background: radial-gradient(120% 100% at 0% 0%, #ffffff 0%, #f1f2f7 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: left;
}
.fbs-el-cover {
  flex: none;
  width: 72px;
  aspect-ratio: 3 / 4;
  border-radius: 2px 7px 7px 2px;
  overflow: hidden;
  background: #e6e8ee;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .12), 0 10px 22px rgba(0, 0, 0, .14);
}
.fbs-el-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.fbs-el-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fbs-el-info strong {
  font-size: 15px;
  color: #15171e;
}
.fbs-el-info span {
  font-size: 13px;
  color: #5d6270;
}
.fbs-el-info em {
  margin-top: 4px;
  font-size: 12px;
  font-style: normal;
  color: #8a8fa0;
}

/* password + schedule gates */
.fbs-gate-form {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 360px;
  margin-top: 4px;
}
.fbs-gate-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #d5d7e0;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  color: #15171e;
  box-sizing: border-box;
}
.fbs-gate-input:focus {
  outline: none;
  border-color: var(--fbs-gate-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fbs-gate-accent) 18%, transparent);
}
.fbs-gate-form .fbs-gate-btn {
  margin-top: 0;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.fbs-gate-error {
  margin: 0;
  font-size: 13px;
  color: #c4320a;
}
.fbs-gate--upcoming .fbs-gate-icon, .fbs-gate--expired .fbs-gate-icon {
  color: #8a6d00;
  background: #fff6db;
}