/* Capri Blu Totem v0.4.60 - review vetro + conferma respirante + hint scroll */

#screen-review .gallery-shell {
  padding-top: 16px;
  padding-bottom: 110px;
}

#screen-review .gallery-header {
  grid-template-columns: minmax(260px, 42%) minmax(0, 1fr) !important;
  min-height: 64px;
  gap: 20px !important;
  margin-bottom: 14px !important;
}

#screen-review .gallery-header h2 {
  font-size: clamp(2rem, 2.5vw, 3.15rem) !important;
  line-height: 1 !important;
}

#screen-review .gallery-header .brand {
  font-size: clamp(.8rem, 1vw, 1rem) !important;
}

#screen-review #back-to-cart {
  max-width: none !important;
  width: 100% !important;
  min-height: 48px;
  background: rgba(18, 93, 145, .82) !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.16) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* La seconda fase ora usa lo stesso linguaggio vetro del carrello. */
#screen-review .review-table-box,
#screen-review .review-list > *,
#screen-review .cart-total-box,
#screen-review .allergen-notice {
  color: #fff !important;
  background: linear-gradient(135deg, rgba(8,31,48,.74), rgba(10,48,73,.58)) !important;
  border: 1px solid rgba(255,255,255,.22) !important;
  box-shadow: 0 12px 28px rgba(0,0,0,.20) !important;
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

#screen-review .review-table-box *,
#screen-review .review-list > * *,
#screen-review .cart-total-box *,
#screen-review .allergen-notice * {
  color: #fff !important;
}

#screen-review .review-table-box,
#screen-review .cart-total-box,
#screen-review .allergen-notice {
  border-radius: 18px !important;
}

#screen-review .review-list > * {
  border-radius: 18px !important;
  margin-bottom: 12px !important;
}

#screen-review .cart-total-box {
  min-height: 70px;
  padding: 16px 24px !important;
  margin-top: 18px !important;
}

#screen-review .cart-total-box strong {
  font-size: clamp(1.65rem, 2vw, 2.25rem) !important;
}

#screen-review .allergen-notice {
  padding: 15px 18px !important;
  margin-top: 14px !important;
}

/* Il totale flottante e' ridondante anche nella schermata verifica. */
body.cb-review-active #nav-v2-floating-cart,
body.cb-review-active .nav-v2-floating-cart,
body.cb-review-active .floating-cart {
  display: none !important;
}

/* Bottone finale: Conferma l'ordine, lento e rassicurante. */
#screen-review #submit-order {
  display: block;
  width: min(680px, 82%);
  min-height: 68px;
  margin: 24px auto 10px !important;
  border-radius: 20px !important;
  font-size: clamp(1.18rem, 1.6vw, 1.65rem) !important;
  font-weight: 900 !important;
  letter-spacing: .02em;
  border: 1px solid rgba(255,255,255,.38) !important;
  background: linear-gradient(135deg, rgba(18,93,145,.96), rgba(10,67,107,.96)) !important;
  box-shadow: 0 0 0 0 rgba(58,153,218,.30), 0 14px 34px rgba(0,0,0,.25) !important;
  animation: cb-review-breathe 4.8s ease-in-out infinite;
  transform-origin: center;
}

#screen-review #submit-order:disabled {
  animation: none;
  opacity: .58;
}

@keyframes cb-review-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(58,153,218,.20), 0 14px 34px rgba(0,0,0,.25);
  }
  50% {
    transform: scale(1.018);
    box-shadow: 0 0 0 10px rgba(58,153,218,0), 0 18px 40px rgba(0,0,0,.29);
  }
}

/* Indicatore animato: fa capire che la verifica continua scorrendo. */
.cb-review-scroll-hint {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 80;
  display: none;
  align-items: center;
  gap: 9px;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 18px;
  color: #fff;
  background: rgba(6,31,49,.78);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 12px 30px rgba(0,0,0,.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}

.cb-review-scroll-hint.visible {
  display: flex;
  opacity: 1;
}

.cb-review-scroll-hint .cb-scroll-gesture {
  position: relative;
  width: 24px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 14px;
}

.cb-review-scroll-hint .cb-scroll-thumb {
  position: absolute;
  left: 50%;
  top: 6px;
  width: 8px;
  height: 13px;
  margin-left: -4px;
  border-radius: 999px;
  background: #fff;
  animation: cb-scroll-drag 2.4s ease-in-out infinite;
}

.cb-review-scroll-hint .cb-scroll-copy {
  font-size: .78rem;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: .025em;
  white-space: nowrap;
}

@keyframes cb-scroll-drag {
  0%, 100% { transform: translateY(0); opacity: .75; }
  50% { transform: translateY(16px); opacity: 1; }
}

@media (max-width: 900px) {
  #screen-review .gallery-header {
    grid-template-columns: 1fr !important;
  }
  #screen-review .gallery-header h2 {
    font-size: clamp(1.9rem, 6vw, 2.8rem) !important;
  }
  #screen-review #submit-order {
    width: 92%;
  }
  .cb-review-scroll-hint {
    right: 10px;
    padding: 8px;
  }
  .cb-review-scroll-hint .cb-scroll-copy {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #screen-review #submit-order,
  .cb-review-scroll-hint .cb-scroll-thumb {
    animation: none !important;
  }
}
