/*~~~~~~~~~~~~~~~~~~~~BOTTOM NAV & ICONS~~~~~~~~~~~~~~~~~~~~*/

.bottom-nav {
  backdrop-filter: blur(15px);
  background-color: #00000021;
  position: sticky;
  height: 70px;
  width: 100%;
  margin-top: 1rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 10;
  border-radius: 20px 20px 0 0;
  padding: 2rem 0 3rem 0;
}

.nav-button {
  height: 2rem;
  width: 2rem;
  font-size: 1.5rem;
}

.nav-button i {
  color: var(--pink);
}

.fa-star-sharp {
  color: #fcbf7a;
}

.half-box i.fa-circle-question {
  color: var(--blue);
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 24px;
}

.fa-microphone {
  color: var(--red);
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 24px;
}

/*~~~~~~~~~~~~~~~~~~~~FAQ MODAL~~~~~~~~~~~~~~~~~~~~*/

#faqModal {
  width: calc(100% + 40px);
  transform: translateX(-20px);
  height: 0;
  border-radius: 20px 20px 0 0;
  position: absolute;
  left: 0;
  background-color: var(--black);
  overflow: auto;
  transition: 225ms cubic-bezier(0, 0, 0.2, 1);
  opacity: 0;
  user-select: none;
  z-index: 100;
}

#faqModal.active {
  bottom: 0;
  opacity: 1;
  user-select: auto;
  height: calc(100vh - 5rem);
  transition: 250ms ease-in;
  transform-origin: bottom;
}

.faq-modal-header {
  width: 100%;
  top: -1px;
  position: sticky;
  background-color: rgb(27, 27, 27);
  border-bottom: 1.5px solid rgb(88, 88, 88);
  z-index: 10;
  display: flex;
  flex-direction: column;
}

.faq-modal-header-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.faq-search-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: border-color 200ms cubic-bezier(0, 0, 0.2, 1);
  border-radius: 10rem;
  margin: .5rem 1.5rem 1.25rem 1.5rem;
  padding: .5rem 1.5rem;
  background: #333;
  border: 1px solid #4b4b4b;
}

.faq-search-container:focus-within {
  border-color: var(--pink);
}

.faq-search-icon {
  color: #ffffff50;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: color 200ms cubic-bezier(0, 0, 0.2, 1);
}

.faq-search-container:focus-within .faq-search-icon {
  color: var(--pink);
}

.faq-search-input {
  background: transparent;
  border: none;
  color: white;
  font-size: 1rem;
  width: 100%;
  outline: none;
  caret-color: var(--pink);
}

.faq-search-input::placeholder {
  color: #ffffff40;
}

.faq-hidden {
  display: none;
}

.faq-no-results {
  color: rgb(130, 130, 130);
  text-align: center;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.faq-modal-close-button {
  margin-right: 1rem;
  height: 1.5rem;
  width: 1.5rem;
  display: grid;
  place-content: center;
  rotate: 45deg;
  cursor: pointer;
  padding: 1.75rem;
}

.faq-modal-close-button i {
  font-size: 1.5rem;
}

.faq-modal-header-title {
  line-height: 1.5rem;
  font-size: 1.125rem;
  padding: 1rem;
}

.faq-modal-body {
  background-color: #333;
  width: 100%;
  min-height: 100%;
  padding: 1.5rem 1.5rem 5rem 1.5rem;
}

.faq-modal-content {
  border: 1px solid transparent;
}

.faq-step-video {
  width: 100%;
  aspect-ratio: 17/9;
  margin: 1rem 0;
  background-color: rgb(27, 27, 27);
  position: relative;
  overflow: visible !important;
}

.faq-image {
  width: 100%;
  border-radius: 1.825rem;
  margin: 0.5rem 0;
  padding: 0 0.5rem;
}

.loading-video-spinner {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid #ccc;
  border-top-color: #555;
  animation: spinner 1s linear infinite;
}

@keyframes spinner {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.faq-modal-content-title {
  padding: 0.875rem 0;
  font-size: 0.9rem;
  cursor: pointer;
}

.faq-modal-content-body {
  padding: 1rem 0;
  line-height: 1.875rem;
}

.faq-modal-section-header,
.faq-modal-content-title {
  font-family: "Avenir", sans-serif;
}

.faq-modal-content-body {
  padding: 0;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 200ms cubic-bezier(0, 0, 0.2, 1);
  margin: 0;
  font-size: 0.938rem;
  line-height: 1.875rem;
}

.faq-modal-content-body.active {
  grid-template-rows: 1fr;
  padding-bottom: 2rem;
}

.faq-modal-content-body p {
  opacity: 0;
}

.faq-modal-content-body.active p {
  margin: 1rem 0;
  opacity: 1;
  transition: 200ms cubic-bezier(0, 0, 0.2, 1);
}

.faq-modal-content-body * {
  overflow: hidden;
  font-size: 0.9rem;
  color: #ffffff;
}

.faq-modal-content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid transparent;
  transition: border-bottom 200ms cubic-bezier(0, 0, 0.2, 1);
}

.faq-modal-content-header.active {
  border-bottom: 1.5px solid #ffffff96;
}

.faq-modal-content-header-expand-button {
  transition: 200ms cubic-bezier(0, 0, 0.2, 1);
  cursor: pointer;
}

.faq-modal-content-header-expand-button.active {
  transform: rotate(135deg);
}

.faq-modal-content-header-expand-button.active i {
  color: var(--pink);
}

.faq-modal-section-header {
  position: sticky;
  top: var(--faq-section-sticky-top, 0px);
  z-index: 5;
  margin: 2.5rem -1.5rem 0;
  padding: 0.5rem 1.5rem 1rem;
  font-size: 1rem;
  color: var(--pink);
  background-color: #333;
}

.faq-modal-section-header::after {
  content: "";
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 0;
  height: 1px;
  background-color: #ffffff96;
}

.faq-modal-section-header:nth-of-type(1) {
  margin-top: 0;
}

.faq-modal-content-body ol li,
.faq-modal-content-body ul li {
  list-style-position: inside;
  margin-left: 1rem;
  margin-block: 0.5rem;
}

.faq-modal-content-body ol.nested li,
.faq-modal-content-body ul.nested li {
  margin-left: 2.5rem;
}

.faq-modal-content-body ol li::marker,
.faq-modal-content-body ul li::marker {
  font-weight: bold;
  color: var(--pink);
}

/*~~~~~~~~~~ Code Blocks ~~~~~~~~~~*/
pre code {
  background-color: #1e1a1a;
  border: 2px solid var(--pink);
  display: block;
  padding: 0.75rem;
  margin: 1rem 0rem;
  border-radius: 1rem;
  white-space: pre-wrap;
  font-family: monospace !important;
}

span.key {
  color: #e68eb4;
  font-family: monospace !important;
}

span.value {
  color: #049874;
  font-family: monospace !important;
}

/*~~~~~~~~~~~~~~~~~~~~ Surface Type ~~~~~~~~~~~~~~~~~~~~*/

.question-line,
.i-dont-see-line,
.surface-type-button {
  font-family: "Avenir", sans-serif;
}

.question-line {
  margin-top: 1rem;
  font-size: 1rem;
}

.i-dont-see-line {
  text-align: center;
  margin-top: 2rem;
  text-decoration: underline;
  font-size: 0.825rem;
  font-weight: bold;
  cursor: pointer;
}

.i-dont-see-line:hover {
  opacity: 0.75;
}

.surface-type-illustration {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1rem 0;
}

.surface-type-button {
  width: 100%;
  border-radius: 50px;
  font-weight: bold;
  padding: 1rem;
  text-align: center;
  margin: 0.5rem 0;
  font-size: 0.825rem;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.surface-type-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  box-shadow: inset 0 0 0 2px var(--white);
  height: 100%;
  width: 100%;
  border-radius: 50px;
  transition: 125ms ease-in-out;
  z-index: -1;
}
.surface-type-button:hover {
  color: var(--black);
}
.surface-type-button:hover::before {
  box-shadow: inset 0 0 0 2rem var(--white);
  transition: 250ms ease-in-out;
}

/*~~~~~~~~~~ MOTORIZATION UPGRADE ~~~~~~~~~~*/
.instructions-wrap {
  flex: 1;
}
.instructions-wrap .step-content .step-text p {
  margin: 1rem auto;
}

.instructions-wrap .step-content ul li,
.instructions-wrap .step-content ol li {
  list-style-position: outside;
  margin-left: 1.5rem;
  margin-block: 0.5rem;
}

.instructions-wrap .step-content ul li::marker,
.instructions-wrap .step-content ol li::marker {
  color: var(--pink);
}

/*~~~~~~~~~~ BYF ~~~~~~~~~~*/
.question {
  color: var(--pink);
  font-size: 1.125rem;
}

.star-rating {
  width: 100%;
  height: 7.5rem;
  border-radius: 10px;
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.star-rating > .rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-around;
  width: 100%;
}

.star-rating > .rating > input {
  display: none;
}

.star-rating > .rating > label {
  margin: 0 0.25rem;
  width: 15%;
  position: relative;
  cursor: pointer;
}

.star-rating > .rating > label > i {
  font-size: 3rem;
}

.star-rating > .rating > label::before {
  font-family: "Font Awesome 6 Pro";
  content: "\e28b";
  position: absolute;
  top: 0%;
  opacity: 0;
  font-size: 3rem;
  font-weight: 900;
  color: #fcbf7a;
}

.star-rating > .rating > label:hover:before,
.star-rating > .rating > label:hover ~ label:before {
  opacity: 1 !important;
}

.star-rating > .rating > input:checked ~ label:before {
  opacity: 1;
}

.star-rating > .rating:hover > input:checked ~ label:before {
  opacity: 0.4;
}

input[type="radio"][id="1-stars"] + label::after {
  content: "Poor";
  position: absolute;
  top: 125%;
  left: 15%;
}

input[type="radio"][id="3-stars"] + label::after {
  content: "Average";
  position: absolute;
  top: 125%;
  left: -5%;
}

input[type="radio"][id="5-stars"] + label::after {
  content: "Excellent";
  position: absolute;
  top: 125%;
  left: -10%;
}

#additionalComments {
  width: 100%;
  max-width: 100%;
  padding: 1rem;
  margin-block: 1rem;
  border-radius: 10px;
  min-height: 7.5rem;
  color: var(--white);
  background-color: #7e7e7f;
  font-size: 1rem;
  transition: border 125ms ease-in-out;
}

#additionalComments::placeholder {
  color: #ffffff7f;
}

#additionalComments:focus {
  border: 2px solid var(--pink);
  outline: none;
  transition: border 125ms ease-in-out;
}

.skip-feedback {
  text-align: center;
  opacity: 0.5;
  cursor: pointer;
}

.skip-feedback:hover {
  text-decoration: underline;
}

.five-star-rating ol {
  margin: 1rem 0 0 1.25rem;
}

/*~~~~~~~~~~ Alerts ~~~~~~~~~~*/

.step-faq-links {
  border: 1px solid var(--white);
  border-radius: 10px;
  padding: 1rem;
  margin-block: 2rem;
  width: 100%;
  height: auto;
  display: grid;
  line-height: 1.5rem;
}

.alert-box {
  border: 1px solid var(--white);
  border-radius: 10px;
  padding: 1rem;
  margin-block: 2rem;
  width: 100%;
  height: auto;
  line-height: 1.5rem;
}

.alert-heading {
  font-weight: bold;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.step-faqs-header {
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.step-faqs-header i {
  font-size: 1rem;
}

.faq-link {
  text-decoration: underline;
  margin-top: 0.75rem;
  cursor: pointer;
  transition: 225ms cubic-bezier(0, 0, 0.2, 1);
}

.faq-link:hover {
  transition: 225ms cubic-bezier(0, 0, 0.2, 1);
  opacity: 0.7;
}

#manualAlert {
  max-height: 0px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  border: 0;
  transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  font-size: 0.825rem;
}

#manualAlert.selected {
  max-height: 500px;
  padding: 1rem;
  margin: 1rem 0;
  overflow: auto;
  border: 1px solid var(--white);
  opacity: 1;
  transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

/*~~~~~~~~~~ AutoCoupon Code ~~~~~~~~~~*/

.auto-coupon-code {
  padding: 1.25rem;
  padding-right: 0.825rem;
  width: calc(100% - 0.25rem);
  background: #77777752;
  backdrop-filter: blur(10px);
  border-radius: 10px;
  position: relative;
}

.coupon-heading {
  font-size: 1.25rem;
  color: var(--pink);
  width: 75%;
  line-height: 1.5;
}

.coupon-body p {
  margin-block: 0.5rem;
  font-size: 0.825rem;
  line-height: 1.66;
}

.coupon-ribbon {
  --f: 0.5em;

  position: absolute;
  top: 0;
  right: 0;
  line-height: 1.8;
  padding-left: 2.7rem;
  padding-right: 2.7rem;
  padding-bottom: var(--f);
  padding-top: calc(var(--f) * 0.5);
  border-image: conic-gradient(#0008 0 0) 51% / var(--f);
  clip-path: polygon(
    100% calc(100% - var(--f)),
    100% 100%,
    calc(100% - var(--f)) calc(100% - var(--f)),
    var(--f) calc(100% - var(--f)),
    0 100%,
    0 calc(100% - var(--f)),
    999px calc(100% - var(--f) - 999px),
    calc(100% - 999px) calc(100% - var(--f) - 999px)
  );
  transform: translate(calc((1 - cos(45deg)) * 100%), -100%) rotate(45deg);
  transform-origin: 0% 100%;
  background-color: #fcbf7a;
  color: var(--black);
  font-weight: bold;
}

.app-store-icon {
  width: 50%;
}

/*~~~~~~~~~~ Review Screen ~~~~~~~~~~*/
.review-screen p {
  margin-block: 1rem;
}
.review-screen ol {
  list-style-position: outside;
  margin-left: 1.5rem;
}

.review-screen ol li {
  margin-bottom: 0.5rem;
}

.review-screen ol li::marker {
  font-weight: bold;
  color: var(--pink);
}

/*~~~~~~~~~~ Cookies Banner ~~~~~~~~~~*/

.cookie-policy {
  font-family: "Avenir", sans-serif;
  font-size: 0.8rem;
  color: white;
  z-index: 100;
  position: absolute;
  background-color: var(--red);
  text-align: center;
  padding: 1.5rem;
  line-height: 1.3rem;
  top: 0;
  left: 0;
  width: 100%;
}

.cookie-policy.hide {
  display: none !important;
}

.cookie-policy.show {
  display: block !important;
}

/* ── Tenebrae welcome modal ──────────────────────────────────────────────
   Shown once per order over the dimmed home page. Dismissed only by the
   "Continue install" button — there is no close control by design. */

.tenebrae-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(112, 112, 112, 0.8); /* #707070 at 80% */
}

body.tenebrae-modal-open {
  overflow: hidden;
}

.tenebrae-modal {
  position: relative;
  width: 100%;
  max-width: 26rem;
  max-height: 100%;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  border-radius: 0.75rem;
  background: #000;
  text-align: center;
}

.tenebrae-modal-mark {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tenebrae-modal-mark img,
.tenebrae-modal-mark svg {
  height: 1.15rem;
  width: auto;
}

.tenebrae-modal-heading {
  margin: 0 0 1.25rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--white);
  /* Constrained and centred so the heading wraps onto two balanced lines
     rather than spanning the full modal width. */
  max-width: 70%;
  margin-left: auto;
  margin-right: auto;
}

.tenebrae-modal-text {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--white);
}

.tenebrae-modal-text-emphasis {
  font-weight: 700;
}

.tenebrae-modal-list {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--white);
  text-align: left;
}

.tenebrae-modal-button {
  display: block;
  width: 100%;
  margin-top: 1.75rem;
  padding: 0.9rem 1.5rem;
  border: 1px solid var(--white);
  border-radius: 999px;
  background: transparent;
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.tenebrae-modal-button:hover {
  background: var(--white);
  color: #000;
}

/* Focus must stay visible for keyboard users without filling the button, since
   the modal focuses it on open and the design calls for an outlined pill. */
.tenebrae-modal-button:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

/* Brand loading mark. The UBlockout "U" animates via SVG; image marks get an
   equivalent pulse so the overlay still reads as a loading state. */
.loading-brand-mark {
  height: 2.75rem;
  width: auto;
  animation: loading-brand-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-brand-pulse {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

/* Close control. Sits in the modal's top-right corner; both this and the
   Continue button mark the modal as seen. */
.tenebrae-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tenebrae-modal-close svg {
  width: 1.15rem;
  height: 1.15rem;
}

.tenebrae-modal-close:hover {
  opacity: 0.7;
}

.tenebrae-modal-close:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}

/* The dialog takes focus on open; suppress its own ring since it is a container,
   not an interactive control. */
.tenebrae-modal:focus {
  outline: none;
}

/* Entry animation. Matches the easing used by the FAQ modal so the app's
   motion stays consistent. */
.tenebrae-modal-overlay {
  animation: tenebrae-backdrop-in 240ms cubic-bezier(0, 0, 0.2, 1) both;
}

/* The backdrop lands first (JS inserts it 1s after the app is shown); the modal
   follows 500ms later, so at ~1.5s. The delay plus `both` holds the from-state
   — which includes visibility:hidden, so the invisible card cannot swallow taps
   in the meantime. */
.tenebrae-modal {
  animation: tenebrae-modal-in 300ms cubic-bezier(0, 0, 0.2, 1) 500ms both;
}

@keyframes tenebrae-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes tenebrae-modal-in {
  from {
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.75rem) scale(0.98);
  }
  to {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tenebrae-modal-overlay,
  .tenebrae-modal {
    animation: none;
  }
}
