.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 24px;
}

.modalOverlay.isActive {
  opacity: 1;
  pointer-events: auto;
}

.modalCard {
  width: 100%;
  max-width: 560px;
  background-color: var(--dark-2);
  border: 1px solid var(--border);
  padding: 32px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  /* GSAP handles slide up entrance when active */
}

/* Custom scrollbar for modal */
.modalCard::-webkit-scrollbar {
  width: 6px;
}

.modalCard::-webkit-scrollbar-track {
  background: var(--dark-2);
}

.modalCard::-webkit-scrollbar-thumb {
  background: var(--border);
}

.modalClose {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.modalClose:hover {
  color: var(--yellow);
}

.modalHeader {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--white);
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.modalSummaryGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.modalSummaryItem {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-sub);
}

.modalSummaryItem i {
  color: var(--yellow);
  width: 16px;
  text-align: center;
}

.modalTotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.modalTotalLabel {
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 1px;
}

.modalTotalValue {
  font-family: var(--font-display);
  font-size: 32px;
  color: var(--yellow);
}

.modalFormGroup {
  margin-bottom: 16px;
}

.modalLabel {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.modalInput {
  width: 100%;
  background-color: var(--dark-3);
  border: 1px solid var(--border);
  color: var(--white);
  padding: 12px 14px;
  outline: none;
  font-family: var(--font-body);
  transition: border-color 0.2s ease;
}

.modalInput:focus {
  border-color: var(--yellow);
}

.modalRadioGroup {
  margin-bottom: 24px;
}

.modalRadioLabel {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-sub);
  margin-bottom: 8px;
  cursor: pointer;
}

.modalRadioLabel input {
  accent-color: var(--yellow);
  width: 16px;
  height: 16px;
}

.modalSubmit {
  width: 100%;
  padding: 16px;
  background-color: var(--yellow);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background-color 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.modalSubmit:hover {
  background-color: var(--yellow-hover);
}

.modalSubmit.loading {
  pointer-events: none;
}

.modalSuccessState {
  display: none;
  text-align: center;
  padding: 40px 0;
}

.modalSuccessState.active {
  display: block;
}

.modalWrapperContent {
  display: block;
}

.modalWrapperContent.hidden {
  display: none;
}

.modalSuccessIcon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
}

.modalSuccessIcon circle {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 2;
  stroke-dasharray: 251;
  stroke-dashoffset: 251;
  animation: drawCircle 0.8s ease forwards;
}

.modalSuccessIcon polyline {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawCheck 0.6s 0.8s ease forwards;
}

@keyframes drawCircle {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes drawCheck {
  to {
    stroke-dashoffset: 0;
  }
}

.modalSuccessTitle {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--white);
  margin-bottom: 16px;
}

.modalSuccessText {
  color: var(--text-sub);
  margin-bottom: 32px;
}

.modalError {
  color: #EF4444;
  font-size: 14px;
  text-align: center;
  margin-top: 12px;
  display: none;
}