.wpac-wrapper {
  max-width: 800px;
  margin: 0 auto 40px;
  padding: 20px;
}

.wpac-box {
  display: flex;
  flex-wrap: wrap;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  overflow: hidden;
  /* Remove margin-bottom here, handle in mobile */
}

.wpac-left,
.wpac-right {
  flex: 1 1 0;
  min-width: 320px;
  box-sizing: border-box;
  padding: 20px;
}

.wpac-left {
  border-right: 1px solid #eee;
  max-width: 420px;
}

.wpac-right {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.wpac-left h2,
.wpac-right h3 {
  margin-top: 0;
}

#wpac-result {
  padding: 20px;
}

.wpac-group {
  margin-bottom: 15px;
}

.wpac-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 5px;
  color: #333;
  font-size: 17px;
}

.wpac-wrapper .wpac-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wpac-time-group {
  margin-bottom: 12px;
}

.wpac-time-label {
  font-weight: 500;
}

.wpac-time-inputs {
  margin-top: 4px;
}

.wpac-result-title {
  margin-bottom: 0;
}

#wpac-include-time {
  width: 17px;
  height: 17px;
  vertical-align: middle;
}

.wpac-dropdown-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wpac-control {
  padding: 8px;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background-color: white;
}

input.wpac-control[type="number"] {
  -webkit-appearance: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Hides spinners in WebKit browsers (Chrome, Safari, Edge) */
input.wpac-control[type=number]::-webkit-inner-spin-button,
input.wpac-control[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

select.wpac-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: url("data:image/svg+xml,%3Csvg width='28' height='28' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8L10 12L14 8' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 2px center;
  background-size: 20px 20px;
  padding-right: 40px;
  cursor: pointer;
}

/* Override theme styles for hover, focus, and active states */
.wpac-wrapper select.wpac-control:hover,
.wpac-wrapper input[type="number"].wpac-control:hover {
  background-color: #fff;
  /* Keep background white on hover */
}


/* Highlight border on focus */
.wpac-wrapper select.wpac-control:focus,
.wpac-wrapper input[type="number"].wpac-control:focus {
  border-color: #80bdff;
  /* Light blue highlight */
  box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.25);
  outline: 0;
  background-color: #fff;
  /* Ensure white background on focus */
  border-radius: 5px;
  /* Ensure rounded corners on focus */
}

#wpac-dob-year,
#wpac-aad-year {
  width: 70px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.wpac-btn {
  padding: 10px 15px;
  font-size: 15px;
  background: #0054B8;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.1s ease-out;
}

.wpac-btn:hover,
.wpac-btn:focus,
.wpac-btn:active {
  background-color: #0054B8;
  outline: none;
}

.wpac-btn:active {
  transform: scale(0.97);
  /* Add a slight zoom-in effect on click */
}

.wpac-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  justify-content: center;
  /* Move buttons to result section, so no margin-bottom here */
}

.wpac-main-line {
  margin-bottom: 16px;
}

.wpac-result-text {
  line-height: 1.7rem;
  margin-left: 5px;
  letter-spacing: 0.3px;
  color: #0055B8;
  font-weight: 500;
}

.wpac-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: wpac-spin 1s ease-in-out infinite;
  vertical-align: middle;
  margin-right: 8px;
}

@keyframes wpac-spin {
  to {
    transform: rotate(360deg);
  }
}

.faq-list {
  margin-top: 1rem;
}

.faq-list dt {
  font-weight: 500;
  font-size: 1.1em;
}

.faq-list dd {
  margin-left: 0;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding-left: 1rem;
  padding-bottom: 10px;
  border-bottom: 1px dashed #ddd;
}

@media (max-width: 900px) {
  .wpac-wrapper {
    max-width: 100%;
  }

  .wpac-box {
    max-width: 100%;
  }

  .wpac-left,
  .wpac-right {
    min-width: 0;
    max-width: 100%;
  }
}

/* mobile specific styles */
@media (max-width: 600px) {
  .wpac-wrapper {
    width: 100%;
    margin: 0 auto 40px;
    padding: 0;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
  }

  .wpac-box {
    flex-direction: column;
    border: none;
    border-radius: 20px;
    background-color: white;
    margin-bottom: 30px;
    box-shadow: none;
  }

  #wpac-dob-year,
  #wpac-aad-year {
    background-color: white;

  }

  .wpac-left {
    border-right: none;
    max-width: 100%;
    padding: 20px 0 10px 1px;
  }

  .wpac-right {
    max-width: 100%;
    padding: 0 0 0 1px;
  }

  #wpac-result {
    padding-left: 0;
  }

  .wpac-group {
    padding-left: 0;
  }

  .wpac-buttons {
    justify-content: center;
    flex-wrap: wrap;
  }

  select.wpac-control {
    padding-right: 30px;
  }
}