/* =========================================================
   Request Modal / Newsletter Modal / Preloader
   MemoryVault Box
========================================================= */

:root {
  --request-green: #58ad78;
  --request-green-dark: #2c8e54;
  --request-soft: #eef8f2;
  --request-text: #0d1b12;
  --request-muted: #51665a;
  --request-border: rgba(83, 174, 119, 0.28);
  --request-shadow: 0 30px 100px rgba(0, 0, 0, 0.34);
}

body.request-modal-open,
body.newsletter-modal-open,
body.preloader-open {
  overflow: hidden;
}

/* =========================================================
   Request Modal
========================================================= */

.request-modal[hidden] {
  display: none !important;
}

.request-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  padding: 14px;
  display: grid;
  place-items: center;
}

.request-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 8, 0.7);
  backdrop-filter: blur(8px);
}

.request-modal__dialog {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100vh - 28px);
  overflow: auto;
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--request-shadow);
}

.request-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.22s ease, background-color 0.22s ease;
}

.request-modal__close:hover {
  transform: rotate(90deg) scale(1.04);
  background: #000;
}

/* Left offer side */

.request-modal__offer {
  padding: 22px;
  background: var(--request-soft);
  border-radius: 22px 0 0 22px;
}

.request-modal__image {
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  margin-bottom: 14px;
  box-shadow: 0 14px 34px rgba(15, 40, 27, 0.11);
}

.request-modal__image img {
  width: 100%;
  height: 175px;
  object-fit: cover;
  display: block;
}

.request-modal__label {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(83, 174, 119, 0.16);
  color: var(--request-green-dark);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.request-modal__offer h2 {
  margin: 0 0 8px;
  color: var(--request-text);
  font-size: 1.68rem;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.request-modal__offer p {
  margin: 0 0 12px;
  color: #29372f;
  font-size: 0.9rem;
  line-height: 1.4;
}

.request-modal__price {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 0 0 10px;
}

.request-modal__price span {
  color: var(--request-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.request-modal__price strong {
  color: var(--request-green-dark);
  font-size: 2rem;
  line-height: 1;
  font-weight: 900;
}

/* Addons */

.request-addons {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.request-addons h3 {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 900;
  color: var(--request-text);
}

.request-addon {
  position: relative;
  display: grid;
  grid-template-columns: 18px 48px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid rgba(83, 174, 119, 0.25);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
}

.request-addon input {
  width: 16px;
  height: 16px;
  accent-color: var(--request-green);
}

.request-addon img {
  width: 48px;
  height: 42px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f7f5;
}

.request-addon span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.request-addon strong {
  color: var(--request-text);
  font-size: 0.86rem;
  line-height: 1.15;
  font-weight: 900;
}

.request-addon small {
  color: #607067;
  font-size: 0.76rem;
  line-height: 1.18;
}

.request-addon b {
  color: var(--request-green-dark);
  font-size: 0.84rem;
  white-space: nowrap;
}

.request-addon.is-selected {
  border-color: var(--request-green);
  background: #f9fffb;
  box-shadow: 0 10px 22px rgba(83, 174, 119, 0.15);
}

.request-total-box {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid rgba(83, 174, 119, 0.34);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.request-total-box span {
  color: var(--request-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.request-total-box strong {
  color: var(--request-green-dark);
  font-size: 1.35rem;
  font-weight: 900;
}

/* Right form side */

.request-modal__form {
  padding: 28px 30px 26px;
  display: grid;
  align-content: start;
}

.request-modal__form h3 {
  margin: 0 0 8px;
  color: var(--request-text);
  font-size: 1.75rem;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.request-modal__form > p {
  margin: 0 0 16px;
  color: #29372f;
  font-size: 0.94rem;
  line-height: 1.4;
}

.form-row {
  display: grid;
  gap: 5px;
  margin-bottom: 11px;
}

.form-row label {
  color: #111827;
  font-size: 0.84rem;
  font-weight: 800;
}

.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  border: 1px solid #dce6e0;
  border-radius: 10px;
  background: #f8fbf9;
  color: #111827;
  padding: 11px 13px;
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background-color 0.22s ease;
}

.form-row textarea {
  min-height: 72px;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  border-color: var(--request-green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(83, 174, 119, 0.13);
}

.request-consent {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 2px 0 15px;
  color: #29372f;
  font-size: 0.82rem;
  line-height: 1.3;
}

.request-consent input {
  margin-top: 2px;
  accent-color: var(--request-green);
}

.request-modal__form .btn,
.request-modal__form button[type="submit"] {
  height: 48px;
  border-radius: 10px;
  font-size: 0.96rem;
  font-weight: 900;
}

.request-modal__form button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Desktop effects */

@media (min-width: 901px) {
  .request-addon:hover {
    transform: translateY(-2px);
    border-color: var(--request-green);
    box-shadow: 0 12px 24px rgba(83, 174, 119, 0.13);
  }
}

/* Modal responsive */

@media (max-width: 860px) {
  .request-modal {
    padding: 10px;
  }

  .request-modal__dialog {
    width: 100%;
    max-height: calc(100vh - 20px);
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .request-modal__offer {
    border-radius: 18px 18px 0 0;
    padding: 18px;
  }

  .request-modal__form {
    padding: 20px 18px 22px;
  }

  .request-modal__image img {
    height: 165px;
  }

  .request-addon {
    grid-template-columns: 18px 46px minmax(0, 1fr);
  }

  .request-addon b {
    grid-column: 3;
  }

  .request-addon img {
    width: 46px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .request-modal__offer h2,
  .request-modal__form h3 {
    font-size: 1.48rem;
  }

  .request-modal__price strong {
    font-size: 1.75rem;
  }

  .request-modal__image img {
    height: 145px;
  }
}

/* =========================================================
   Request Preloader
========================================================= */

.preloader[hidden] {
  display: none !important;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 10050;
  padding: 20px;
  display: grid;
  place-items: center;
  background: rgba(5, 12, 8, 0.76);
  backdrop-filter: blur(9px);
}

.preloader-box {
  width: min(420px, 100%);
  padding: 38px 30px 32px;
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.34);
}

.loader {
  width: 72px;
  height: 72px;
  margin: 0 auto 22px;
  border-radius: 50%;
  border: 7px solid rgba(83, 174, 119, 0.18);
  border-top-color: var(--request-green);
  display: block;
  animation: requestSpin 0.85s linear infinite;
}

@keyframes requestSpin {
  to {
    transform: rotate(360deg);
  }
}

.preloader-box h2 {
  margin: 0 0 10px;
  color: var(--request-text);
  font-size: 1.65rem;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.preloader-box p {
  margin: 0;
  color: var(--request-muted);
  font-size: 1rem;
  line-height: 1.45;
  font-weight: 600;
}

.preloader-progress {
  width: 100%;
  height: 8px;
  margin-top: 22px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(83, 174, 119, 0.15);
}

.preloader-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--request-green);
}

.preloader.is-processing .preloader-progress span {
  animation: requestProgress 5s ease forwards;
}

@keyframes requestProgress {
  to {
    width: 100%;
  }
}

/* =========================================================
   Newsletter Modal
========================================================= */

.newsletter-modal[hidden] {
  display: none !important;
}

.newsletter-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  padding: 20px;
  display: grid;
  place-items: center;
}

.newsletter-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 8, 0.62);
  backdrop-filter: blur(7px);
}

.newsletter-modal__box {
  position: relative;
  width: min(440px, 100%);
  padding: 38px 32px 32px;
  border-radius: 24px;
  background: #fff;
  text-align: center;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
}

.newsletter-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.newsletter-modal__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--request-green);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 36px;
  font-weight: 900;
}

.newsletter-modal__box h2 {
  margin: 0 0 12px;
  color: var(--request-text);
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 900;
}

.newsletter-modal__box p {
  margin: 0 0 22px;
  color: #29372f;
  line-height: 1.5;
}

.newsletter-modal__box .btn {
  min-width: 160px;
}

/* =========================================================
   Reduced motion
========================================================= */

@media (prefers-reduced-motion: reduce) {
  .request-modal *,
  .newsletter-modal *,
  .preloader * {
    animation: none !important;
    transition: none !important;
  }
}