/* Modal Styles */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.35); /* Black w/ opacity */
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal .close {
  color: #888;
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 1.7rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s;
}
.modal .close:hover,
.modal .close:focus {
  color: #222;
}

.promo-code {
  width: 17rem!important;
  max-width: 100%;
  box-sizing: border-box;
}

#promo-code-btn {
  margin-bottom: 10px!important;
  text-align: center!important;
  width: auto;
  margin-left: 1rem;
}

.modal-content {
  background: var(--primary-background, #fff);
  margin: 50vh auto;
  transform: translateY(-50%);
  padding: 2rem 2.5rem;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  color: var(--primary-color, #222);
}

.main-content button {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border: none;
  border-radius: 5px;
  background-color: var(--primary-color);
  color: var(--secondary-color);
  cursor: pointer;
  transition: background-color 0.3s;
  width: auto;
  transition: transform 0.1s ease-in;
}

.main {
  height: 80vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.main-content {
  padding: 2rem;
  background: var(--primary-background); /* white background */
  border-radius: 12px;                   /* smooth corners */
  box-shadow: 0px 0px 20px 20px rgba(0, 0, 0, 0.12);
  text-align: left; /* Ensure left alignment */
}

#recaptcha-container {
  margin: 1rem 0;
}

#pay-btn {
  margin-bottom: 1rem;
}

.main h1 {
  margin: 1rem 0;
}

.main h2 {
  margin: 1rem 0 0 0;
}

.main-features {
  color: var(--subheading-color);
  margin: 0 1rem;
}

.main-content input {
  box-sizing: border-box;
  width: 100%;
  max-width: 520px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid rgb(59, 59, 59); /* subtle border */
  background: var(--primary-background); /* primary background */
  font-size: 15px;
  line-height: 1.3;
  outline: none;
  transition: box-shadow 160ms ease, border-color 120ms ease,
    transform 80ms ease;
  height: fit-content;
}

.main-content input::placeholder {
  color: rgb(59, 59, 59);
  opacity: 1;
  font-weight: 500;
}

/* Style the select box itself */
.main-content select {
  box-sizing: border-box;
  min-width: 80px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid rgb(59, 59, 59);
  background: var(--primary-background);
  color: var(--primary-color);
  font-size: 15px;
  line-height: 1.3;
  outline: none;
  transition: box-shadow 160ms ease, border-color 120ms ease,
    transform 80ms ease;
  margin: 0.9rem 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg fill='rgba(68,68,68,0.6)' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  cursor: pointer;
}

/* Hover and focus */
.main-content select:hover {
  border-color: rgba(17, 17, 17, 0.25);
}
.main-content select:focus-visible {
  border-color: var(--primary-color);
  box-shadow: 0 6px 18px rgba(53, 53, 53, 0.3);
  transform: translateY(-1px);
}

/* Style the dropdown options */
.main-content select option {
  background: var(--primary-background);
  color: var(--primary-color);
  padding: 10px;
}

/* Optional: style a disabled placeholder option */
.main-content select option[disabled] {
  color: rgba(68, 68, 68, 0.4);
}

.information {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.information input {
  flex: 1;
}

.information select {
  max-width: 80px;
}


.btn {
  margin-right: 0.8rem!important;
}

.btn:hover {
  transform: scale(1.02);
}

.processing-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary-color);
  border-radius: 12px;
  pointer-events: none; /* let clicks pass when hidden */
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 10;
}

/* Spinner */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary-color, #222);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin-bottom: 0.8rem;
  animation: spin 1s linear infinite;
}

.disabled {
  opacity: 0.5;           /* visually faded */
  pointer-events: none;    /* disables clicks, hovers, etc. */
  user-select: none;       /* prevents text selection */
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1200px) {
  .main-content {
    max-width: 90%;
    padding: 1.8rem;
  }
}

@media (max-width: 992px) {
  .main {
    height: auto;
    min-height: 80vh;
    padding: 2rem 1rem;
  }
  
  .main-content {
    max-width: 95%;
    padding: 1.5rem;
  }
  
  .main-features {
    margin: 0 0.5rem;
  }
  
  /* Keep information flex row for tablets */
  .information {
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    align-items: center;
  }
  
  .information input {
    flex: 1;
    min-width: 0; /* Allow input to shrink */
  }
  
  .information select {
    flex-shrink: 0;
    max-width: 90px;
  }
}

@media (max-width: 768px) {
  .main {
    padding: 1.5rem 0.5rem;
  }
  
  .main-content {
    padding: 1.2rem;
    max-width: 100%;
    margin: 0 0.5rem;
  }
  
  .main h1 {
    font-size: 1.8rem;
    margin: 0.8rem 0;
  }
  
  .main h2 {
    font-size: 1.2rem;
    margin: 0.8rem 0 0 0;
  }
  
  .main-features {
    margin: 0;
    padding-left: 1rem;
  }
  
  .main-feature {
    font-size: 0.9rem;
    margin: 0.5rem 0;
  }
  
  /* Still keep row layout on tablets */
  .information {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
  }
  
  .information input {
    flex: 1;
    min-width: 0;
  }
  
  .information select {
    flex-shrink: 0;
    max-width: 80px;
  }
  
  .main-content input,
  .main-content select {
    margin: 0.5rem 0;
    font-size: 14px;
    padding: 10px 12px;
  }
  
  .main-content button {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    margin: 0.8rem 0 0 0;
    width: 100%;
  }
  
  .promo-code {
    width: 100%!important;
    max-width: none!important;
  }
  
  #promo-code-btn {
    margin-left: 0!important;
    margin-top: 0.5rem!important;
    width: 100%;
  }
  
  .modal-content {
    padding: 1.5rem 2rem;
    margin: 1rem;
    width: calc(100% - 2rem);
    max-width: 350px;
  }
}

@media (max-width: 600px) {
  .main {
    padding: 1rem 0.25rem;
  }
  
  .main-content {
    padding: 1rem;
    box-shadow: 0px 0px 15px 10px rgba(0, 0, 0, 0.1);
  }
  
  .main h1 {
    font-size: 1.6rem;
  }
  
  .main h2 {
    font-size: 1.1rem;
  }
  
  .main-feature {
    font-size: 0.85rem;
  }
  
  /* Try to maintain row layout with smaller gaps */
  .information {
    display: flex;
    flex-direction: row;
    gap: 0.3rem;
    align-items: center;
  }
  
  .information input {
    flex: 1;
    min-width: 0;
    font-size: 13px;
  }
  
  .information select {
    flex-shrink: 0;
    max-width: 70px;
    font-size: 13px;
  }
  
  #recaptcha-container {
    transform-origin: center;
    margin: 0.5rem 0;
  }
}

/* Transition point - still trying to maintain row layout */
@media (max-width: 540px) {
  .main-content {
    padding: 0.9rem;
  }
  
  .main h1 {
    font-size: 1.5rem;
  }
  
  /* Last attempt at row layout with minimal gap */
  .information {
    display: flex;
    flex-direction: row;
    gap: 0.2rem;
    align-items: center;
  }
  
  .information input {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    padding: 8px 10px;
  }
  
  .information select {
    flex-shrink: 0;
    max-width: 60px;
    font-size: 12px;
    padding: 8px 6px;
  }
}

@media (max-width: 480px) {
  .main {
    padding: 0.5rem 0.1rem;
  }
  
  .main-content {
    padding: 0.8rem;
    margin: 0 0.2rem;
  }
  
  .main h1 {
    font-size: 1.4rem;
    margin: 0.5rem 0;
  }
  
  .main h2 {
    font-size: 1rem;
  }
  
  .main-features {
    padding-left: 0.8rem;
  }
  
  .main-feature {
    font-size: 0.8rem;
    margin: 0.4rem 0;
  }
  
  /* Only switch to column layout on very small screens */
  .information {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }
  
  .main-content input,
  .main-content select {
    font-size: 13px;
    padding: 8px 10px;
    margin: 0.3rem 0;
  }
  
  .information select {
    max-width: none;
    width: 100%;
  }
  
  .main-content button {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
  
  .subheading {
    font-size: 0.9rem;
  }
  
  #recaptcha-container {
    margin: 0;
  }
  
  .modal-content {
    padding: 1.2rem 1.5rem;
    margin: 0.5rem;
  }
  
  .modal .close {
    top: 8px;
    right: 12px;
    font-size: 1.5rem;
  }
  
  .spinner {
    width: 30px;
    height: 30px;
    margin-bottom: 0.6rem;
  }
  
  .processing-overlay {
    font-size: 1rem;
  }
}

@media (max-width: 360px) {
  .main-content {
    padding: 0.6rem;
  }
  
  .main h1 {
    font-size: 1.2rem;
  }
  
  .main h2 {
    font-size: 0.9rem;
  }
  
  .main-feature {
    font-size: 0.75rem;
  }
  
  #recaptcha-container {
    transform: scale(0.65);
  }
}

.policy-reminder {
  margin-top: 0.5rem;
}
