/* 
 This CSS file is used to override the existing styles of the theme.
 You can change the article headings, fonts, colors, etc.
*/

/* Apply text input styles to password inputs */
input[type='password'], input[type='email'] {
  width: 100%;
  max-width: 72em;
  margin-bottom: 0.5em;
  margin-top: 0.5em;
}

/* Make buttons fill full width equally in full-width button-group */
.button-group-full-width > * {
  flex: 1 1 0%;
  min-width: 0;
}

/* Make submit button full width */
form input[type='submit'] {
  width: 100%;
}

/* Form container styling - border and shadow */
#purchaseForm {
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  padding: 2rem;
  background-color: #FFFFFF;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  max-width: 100%;
}

@media (min-width: 768px) {
  #purchaseForm {
    padding: 2.5rem;
  }
}

/* Custom checkbox styling to match form theme */
.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #9CA3AF;
  border-radius: 0.25rem;
  background-color: #E5E7EB;
  cursor: pointer;
  position: relative;
  margin-right: 0.75rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.custom-checkbox:hover {
  background-color: #D1D5DB;
  border-color: #6B7280;
}

.custom-checkbox:focus {
  outline: none;
  background-color: #FFFFFF;
  border-color: #6B7280;
  box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
}

.custom-checkbox:checked {
  background-color: #1F2937;
  border-color: #1F2937;
}

.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 0.375rem;
  height: 0.75rem;
  border: solid white;
  border-width: 0 2px 2px 0;
}

.checkbox-label {
  padding: 0.75rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s ease;
}

.checkbox-label:hover {
  background-color: #F3F4F6;
}

.checkbox-text {
  color: #374151;
  font-size: 1rem;
  user-select: none;
}

/* Loading spinner for submit button */
.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.6s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Button disabled state */
#submit-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}