body.gf-opp-modal-open { overflow: hidden; }

.gf-opp-modal[hidden] { display: none !important; }

.gf-opp-modal {
  --gf-opp-red: #c51f2a;
  --gf-opp-red-dark: #970b14;
  --gf-opp-ink: #171717;
  --gf-opp-muted: #666;
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 20px;
  position: fixed;
  z-index: 100010;
}

.gf-opp-modal * { box-sizing: border-box; }

.gf-opp-modal__backdrop {
  background: rgba(10, 8, 8, .7);
  inset: 0;
  position: absolute;
}

.gf-opp-modal__dialog {
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 24px;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .36);
  color: var(--gf-opp-ink);
  max-height: calc(100dvh - 40px);
  max-width: 560px;
  overflow-y: auto;
  padding: 48px 48px 40px;
  position: relative;
  scrollbar-color: rgba(112, 112, 112, .72) transparent;
  scrollbar-width: thin;
  text-align: center;
  width: 100%;
}

.gf-opp-modal__dialog:focus { outline: none; }

.gf-opp-modal__dialog::-webkit-scrollbar { width: 5px; }
.gf-opp-modal__dialog::-webkit-scrollbar-track { background: transparent; }
.gf-opp-modal__dialog::-webkit-scrollbar-thumb {
  background: rgba(112, 112, 112, .72);
  border: 0;
  border-radius: 999px;
}
.gf-opp-modal__dialog::-webkit-scrollbar-button { display: none; height: 0; width: 0; }

.gf-opp-modal__close {
  align-items: center;
  background: var(--gf-opp-red) !important;
  border: 1px solid var(--gf-opp-red) !important;
  border-radius: 999px !important;
  box-shadow: 0 5px 18px rgba(0, 0, 0, .09) !important;
  color: #fff !important;
  cursor: pointer;
  display: flex;
  font-size: 0 !important;
  height: 42px;
  justify-content: center;
  line-height: 1 !important;
  max-width: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  position: absolute;
  right: 20px;
  top: 20px;
  width: 42px !important;
}

.gf-opp-modal__close::before,
.gf-opp-modal__close::after {
  background: currentColor;
  border-radius: 999px;
  content: '';
  height: 3px;
  left: 50%;
  position: absolute;
  top: 50%;
  width: 14px;
}

.gf-opp-modal__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.gf-opp-modal__close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.gf-opp-modal__close:hover { background: var(--gf-opp-red-dark) !important; }

.gf-opp-modal__icon {
  align-items: center;
  background: #f8eeee;
  border-radius: 999px;
  color: var(--gf-opp-red);
  display: flex;
  height: 68px;
  justify-content: center;
  margin: 10px auto 22px;
  position: relative;
  width: 68px;
}

.gf-opp-modal[data-type="success"] .gf-opp-modal__icon::before {
  border-bottom: 4px solid currentColor;
  border-right: 4px solid currentColor;
  content: '';
  height: 23px;
  transform: translateY(-4px) rotate(45deg);
  width: 12px;
}

.gf-opp-modal[data-type="error"] .gf-opp-modal__icon::before {
  content: '!';
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
}

.gf-opp-modal__eyebrow {
  color: var(--gf-opp-red);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .18em;
  margin: 0 0 10px;
}

.gf-opp-modal__title {
  color: var(--gf-opp-ink);
  font-size: clamp(25px, 4vw, 32px);
  font-weight: 760;
  letter-spacing: -.025em;
  line-height: 1.2;
  margin: 0 auto 16px;
  max-width: 440px;
}

.gf-opp-modal__message {
  color: var(--gf-opp-muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 0 auto;
  max-width: 430px;
}

.gf-opp-modal__actions {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.gf-opp-modal__primary,
.gf-opp-modal__secondary {
  align-items: center;
  border-radius: 10px !important;
  cursor: pointer;
  display: flex;
  font-size: 15px !important;
  font-weight: 750;
  justify-content: center;
  min-height: 50px;
  padding: 12px 18px !important;
  text-decoration: none !important;
  width: 100%;
}

.gf-opp-modal__primary {
  background: var(--gf-opp-red) !important;
  border: 1px solid var(--gf-opp-red) !important;
  color: #fff !important;
}

.gf-opp-modal__primary:hover { background: var(--gf-opp-red-dark) !important; }

.gf-opp-modal__secondary {
  background: #f4f4f4 !important;
  border: 1px solid #e3e3e3 !important;
  color: var(--gf-opp-ink) !important;
}

.gf-opp-modal__secondary:hover { background: #eaeaea !important; }

@media (max-width: 600px) {
  .gf-opp-modal { padding: 12px; }
  .gf-opp-modal__dialog {
    border-radius: 20px;
    max-height: calc(100dvh - 24px);
    padding: 64px 24px 28px;
  }
  .gf-opp-modal__close { right: 16px; top: 16px; }
  .gf-opp-modal__icon { height: 60px; margin-top: 0; width: 60px; }
  .gf-opp-modal__message { font-size: 15px; }
}
