/* Remove the global body reset — scope styles only to the modal */
.modal-content {
  font-family: Arial, sans-serif;
  color: #000;
  line-height: 1.4;
}

/* Heading/text helpers */
.htcolor {
  color:#ffffff;
}

.txcolor {
  color:#ffffff;
}

.modal {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(60 60 60 / 60%);
  z-index: 9999;
}

.modal-content {
  background: #0d0d0d;
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  max-width: 550px;
  box-shadow: 0 0 20px rgba(0,0,0,0.2);
  position: relative;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
}

.step-number {
  font-weight: bold;
  font-size: 1rem;
  color: #fdcc38;
  margin-bottom: 10px;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

input[type="text"], input[type="email"], input[type="tel"] {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ccc;
  border-radius: 6px;
  color: #7b7b7b;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
}

.toggle-button {
  background-color: #fcf4db;
  border: 1px solid #fdcc38;
  color: #282828;
  padding: 10px 14px;
  border-radius: 5px;
  cursor: pointer;
  flex-grow: 1;
  text-align: center;
  min-width: 100px;
}

.toggle-button.active {
  background-color: #353535;
  color: white;
  border-color: #000000;
}

.next-btn, button[type=submit] {
  background-color: #f6c226;
  color: rgb(26, 25, 25);
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  font-size: 16px;
  font-weight: bold;
}

/* Make all links black inside modal */
.modal-content a {
  color: rgb(0, 0, 0);
}

/* Ensure form field text is black */
.modal-content input,
.modal-content textarea,
.modal-content select,
.modal-content button {
  color: #020202;
}

/* ========================= */
/* MOBILE FRIENDLY FIXES     */
/* ========================= */

@media (max-width: 480px) {
  .modal {
    align-items: flex-start;
    padding: 16px 14px;
  }

  .modal-content {
    max-width: 100%;
    margin: 12px auto 24px;
    padding: 25px 16px;
    border-radius: 12px;
    max-height: none;
  }

  .modal-content h1,
  .modal-content .h1 {
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.2;
    margin: 8px 0 10px;
    word-break: break-word;
  }

  .modal-content h2,
  .modal-content .h2 {
    font-size: clamp(18px, 5vw, 22px);
    line-height: 1.2;
    margin: 6px 0 10px;
  }

  .modal-content p {
    font-size: 15px;
    line-height: 1.45;
    margin: 8px 0 12px;
    padding: 2px;
    max-width: 95%;
  }

  input[type="text"],
  input[type="email"],
  input[type="tel"],
  textarea,
  select {
    font-size: 16px;
    padding: 12px;
    margin: 8px 0;
    min-height: 44px;
  }

  .button-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 12px 0 6px;
  }

  .toggle-button {
    width: 95%;
    min-width: 0;
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 10px;
  }

  .next-btn,
  button[type="submit"] {
    width: 95%;
    min-width: 0;
    font-size: 16px;
    padding: 14px;
    border-radius: 10px;
  }

  .step-number { margin-bottom: 8px; }

  .close-modal {
    top: 8px;
    right: 10px;
    font-size: 26px;
    padding: 4px 8px;
  }
}

@media (min-width: 481px) and (max-width: 640px) {
  .button-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Prevent background scroll when modal open */
body.modal-open {
  overflow: hidden;
  touch-action: none;
}

/* Prevent long headings overflow */
.modal-content h1, 
.modal-content h2, 
.modal-content h3 {
  overflow-wrap: anywhere;
}