/* Visitor's Book — VD7 Component 4 */

.aw-visitors-book {
  margin-bottom: 28px;
}

.aw-visitors-book__stage {
  position: relative;
}

.aw-visitors-book__book {
  display: grid;
  grid-template-columns: 22px 1fr;
  width: min(100%, var(--visitors-book-max));
  height: auto;
  margin: 0 auto;
  background: #2a1f14;
  border-radius: 8px;
  overflow: hidden;
  box-sizing: border-box;
}

.aw-visitors-book__spine {
  border-right: 1px solid rgba(195, 133, 58, .2);
  background: linear-gradient(90deg, #1a1208 0%, #3d2b18 50%, #2a1f14 100%);
}

.aw-visitors-book__page {
  box-sizing: border-box;
  min-height: 0;
  padding: 14px 14px 14px 30px;
  color: var(--gold);
  text-align: center;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.aw-visitors-book__header {
  flex: 0 0 auto;
}

.aw-visitors-book__title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 26px;
  font-weight: 600;
  line-height: 1.05;
  color: var(--gold);
}

.aw-visitors-book__subtitle {
  margin: 12px 0 0;
  font-family: "DM Sans", sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(195, 133, 58, .5);
}

.aw-visitors-book__rule {
  width: 100%;
  height: 1px;
  margin: 12px 0 0;
  background: rgba(195, 133, 58, .2);
}

.aw-visitors-book__aggregate-stars,
.aw-visitors-book__entry-stars {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex: 0 0 20px;
  height: 20px;
  margin: 12px 0 0;
  color: rgba(195, 133, 58, .25);
  font-size: 20px;
  line-height: 1;
}

.aw-visitors-book__aggregate-stars span.is-filled,
.aw-visitors-book__entry-stars span.is-filled {
  color: var(--gold);
}

.aw-visitors-book__closed-body {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 12px;
}

.aw-visitors-book__preview {
  box-sizing: border-box;
  flex: 0 0 78px;
  width: 100%;
  height: 78px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(195, 133, 58, .18);
  border-radius: 4px;
  background: var(--sand);
  text-align: left;
  overflow: hidden;
}

.aw-visitors-book__preview-text {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: var(--body-size);
  font-style: italic;
  line-height: 1.45;
  color: var(--gold);
  overflow: hidden;
}

.aw-visitors-book__preview-prompt {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: var(--h3-size);
  font-style: italic;
  line-height: 1.45;
  color: var(--blue);
  overflow: hidden;
}

.aw-visitors-book__cta,
.aw-visitors-book__ok {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  border: 1px solid rgba(195, 133, 58, .25);
  background: rgba(26, 18, 8, .2);
  color: var(--sand);
  font-family: "DM Sans", sans-serif;
  font-size: var(--nav-size);
  font-weight: 500;
  cursor: pointer;
}

.aw-visitors-book__cta {
  flex: 0 0 42px;
  height: 42px;
  margin-top: 14px;
  border-radius: 4px;
}

.aw-visitors-book__ok {
  flex: 0 0 auto;
  width: auto;
  min-width: 72px;
  height: auto;
  min-height: 36px;
  margin-left: auto;
  background: #2a1f14;
  color: var(--gold);
}

.aw-visitors-book__ok.is-active {
  background: var(--gold);
  color: var(--sand);
  border-color: var(--gold);
}

.aw-visitors-book__closed-success {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 78px;
  margin-top: 12px;
  padding: 0;
}

.aw-visitors-book__success-message {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: var(--nav-size);
  line-height: 1.5;
  color: var(--gold);
  text-align: center;
}

.aw-visitors-book__overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(26, 26, 46, .45);
}

.aw-visitors-book__overlay[hidden] {
  display: none !important;
}

.aw-visitors-book__spread {
  display: flex;
  flex-direction: column;
  width: 960px;
  max-width: 100%;
  height: auto;
  background: var(--sand);
  color: var(--gold);
  overflow: hidden;
  box-sizing: border-box;
  transform-origin: right center;
  transition: transform .5s ease, opacity .5s ease;
}

.aw-visitors-book.is-opening .aw-visitors-book__spread {
  animation: aw-visitors-book-turn .5s ease forwards;
}

@keyframes aw-visitors-book-turn {
  0% {
    transform: perspective(900px) rotateY(-18deg) scaleX(.5);
    opacity: .7;
  }
  100% {
    transform: perspective(900px) rotateY(0deg) scaleX(1);
    opacity: 1;
  }
}

.aw-visitors-book__spread-inner {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 14px 0;
  overflow-y: auto;
  box-sizing: border-box;
}

.aw-visitors-book__entry {
  margin-bottom: 14px;
  text-align: left;
}

.aw-visitors-book__entry-text {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", serif;
  font-size: var(--body-size);
  font-style: italic;
  line-height: 1.45;
  color: var(--gold);
}

.aw-visitors-book__entry-meta {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: var(--label-size);
  color: rgba(195, 133, 58, .5);
}

.aw-visitors-book__spread-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: 0 14px 14px;
}

.aw-visitors-book__spread-footer[hidden] {
  display: none !important;
}

.aw-visitors-book__close-book {
  border: none;
  background: transparent;
  color: var(--gold);
  font-family: "DM Sans", sans-serif;
  font-size: var(--nav-size);
  font-weight: 500;
  cursor: pointer;
}

.aw-visitors-book__pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.aw-visitors-book__page-label {
  font-family: "DM Sans", sans-serif;
  font-size: var(--label-size);
  color: var(--gold);
}

.aw-visitors-book__page-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(195, 133, 58, .45);
  border-radius: 50%;
  background: transparent;
  color: var(--gold);
  cursor: pointer;
}

.aw-visitors-book__page-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.aw-visitors-book__write-open .aw-visitors-book__form {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.aw-visitors-book__write-stars {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: rgba(195, 133, 58, .25);
}

.aw-visitors-book__write-stars .aw-star-rating__star {
  border: none;
  background: none;
  padding: 0;
  font-size: 46px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--gold);
  cursor: pointer;
}

.aw-visitors-book__write-stars .aw-star-rating__star.is-filled {
  color: var(--gold);
  -webkit-text-stroke: 0;
}

.aw-visitors-book__write-prompt {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", serif;
  font-size: var(--body-size);
  font-style: italic;
  color: var(--blue);
}

.aw-visitors-book__write-prompt--centred {
  text-align: center;
}

.aw-visitors-book__write-prompt--clickable {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.aw-visitors-book__write-field {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: var(--sand);
  color: var(--gold);
  font-family: "Cormorant Garamond", serif;
  font-size: var(--body-size);
  font-style: italic;
  line-height: 1.45;
  resize: none;
}

.aw-visitors-book__write-field::placeholder {
  color: var(--blue);
  opacity: 1;
}

.aw-visitors-book__privacy {
  margin: 0;
  padding: 0;
  border: none;
  text-align: left;
}

.aw-visitors-book__privacy-option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-family: "DM Sans", sans-serif;
  font-size: var(--nav-size);
  font-weight: 400;
  color: var(--gold);
  cursor: pointer;
}

.aw-visitors-book__privacy-option input {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: transparent;
}

.aw-visitors-book__privacy-option input:checked {
  background: var(--gold);
  box-shadow: inset 0 0 0 3px var(--sand);
}

.aw-visitors-book__measure {
  position: absolute;
  left: -9999px;
  top: 0;
  visibility: hidden;
  width: 932px;
  pointer-events: none;
}

.aw-star-rating--pulse .aw-star-rating__star {
  animation: aw-star-pulse 1.2s ease-in-out 2;
}

@keyframes aw-star-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: .85; }
}

.aw-visitors-book--compact {
  margin-bottom: 0;
}

.aw-visitors-book--popup {
  margin-bottom: 0;
}

@media (width <= 767px) {
  .aw-visitors-book__book {
    width: 100%;
  }

  .aw-visitors-book__spread {
    width: 100vw;
    max-width: none;
    border-radius: 0;
  }

  .aw-visitors-book__overlay {
    padding: 0;
  }

  .aw-visitors-book__measure {
    width: calc(100vw - 28px);
  }
}
