/* Use consistent styling with front page search forms */

/* Ensure login and register sections maintain proper layout */
.login-section .search-form-section,
.register-section .search-form-section {
  max-width: 100%;
  padding: 0;
}

/* Form field groups - matching front page search styling */
.horsequip-login-form .search-field-group,
.horsequip-register-form .search-field-group {
  margin-bottom: 25px;
}

.horsequip-login-form .form-item,
.horsequip-register-form .form-item {
  margin-bottom: 25px;
}

/* Hide form labels and use placeholders - consistent with front page */
.horsequip-login-form .form-item label,
.horsequip-register-form .form-item label {
  display: none;
}

.horsequip-login-form .form-item-terms label,
.horsequip-register-form .form-item-terms label {
  display: block;
  font-size: 0.8rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  margin-bottom: 15px;
  font-family: 'Roboto', sans-serif;
  line-height: 1.4;
}

/* Input and select styling to match front page search inputs */
.horsequip-input,
.horsequip-select {
  width: 100%;
  padding: 12px 15px;
  border: none;
  border-bottom: 1px solid #000;
  border-radius: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none;
  outline: none;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #666;
  font-family: 'Roboto', sans-serif;
  background-color: transparent;
}

/* Select dropdown specific styling */
.horsequip-select {
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="m2 0-2 2h4zm0 5 2-2h-4z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;
  padding-right: 40px;
}

/* Choices.js Custom Styling */
.horsequip-choices {
  margin-bottom: 25px;
  position: relative;
  transition: margin-bottom 0.3s ease-in-out;
  z-index: 1001;
}

/* Ensure parent containers don't clip the dropdown - be more specific */
.register-section .form-item-role,
.login-section .form-item-role,
.form-item-role .horsequip-choices {
  overflow: visible !important;
}

/* Only affect the specific form item containing the select dropdown */
.form-item-role {
  overflow: visible !important;
  z-index: 1002;
}

/* Ensure collapsible content can show dropdowns */
.register-section.active .collapsible-content,
.login-section.active .collapsible-content {
  overflow: visible !important;
}

.horsequip-choices__inner {
  border: none;
  border-bottom: 1px solid #000;
  border-radius: 0;
  background-color: transparent;
  min-height: 45px;
  padding: 12px 15px;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #666;
  font-family: 'Roboto', sans-serif;
}

.horsequip-choices.is-focused .horsequip-choices__inner,
.horsequip-choices.is-open .horsequip-choices__inner {
  background-color: #d0d0d0;
  border-bottom-color: #8B4513;
  outline: none;
}

.horsequip-choices__list--single {
  padding: 0;
}

.horsequip-choices__item {
  color: #666;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  font-family: 'Roboto', sans-serif;
}

.horsequip-choices__placeholder {
  color: #999;
  opacity: 1;
}

.horsequip-choices__list--dropdown {
  border: 1px solid #ddd;
  border-radius: 0;
  border-top: none;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 10000 !important;
  position: absolute !important;
  top: 100% !important;
  left: 0;
  right: 0;
  max-height: 200px;
  overflow-y: auto;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.horsequip-choices:not(.is-open) .horsequip-choices__list--dropdown {
  display: none !important;
}

.horsequip-choices.is-open .horsequip-choices__list--dropdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Dropdown expansion animation */
.horsequip-choices.dropdown-expanded {
  z-index: 1001;
}

.horsequip-choices__list--dropdown {
  animation: slideDown 0.3s ease-out;
  transform-origin: top;
}

/* Animation for dropdown opening */
@keyframes slideDown {
  0% {
    opacity: 0;
    transform: translateY(-10px) scaleY(0.9);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scaleY(1);
  }
}

/* Smooth transitions for form elements below dropdown */
.search-form-section {
  transition: all 0.3s ease-in-out;
}

/* Additional spacing for expanded dropdown */
.horsequip-choices.dropdown-expanded .horsequip-choices__list--dropdown {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Global override to ensure dropdown is always visible when open - more specific selector */
.register-section .horsequip-choices.is-open .horsequip-choices__list--dropdown,
.login-section .horsequip-choices.is-open .horsequip-choices__list--dropdown,
.form-item-role .choices.is-open .choices__list--dropdown {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10000 !important;
  position: absolute !important;
  background: white !important;
  border: 1px solid #ddd !important;
  max-height: 200px !important;
  overflow-y: auto !important;
}

.horsequip-choices__item--choice {
  padding: 12px 15px;
  font-size: 0.9rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  color: #666;
  text-transform: uppercase;
  font-family: 'Roboto', sans-serif;
  border-bottom: 1px solid #f0f0f0;
}

.horsequip-choices__item--choice:last-child {
  border-bottom: none;
}

.horsequip-choices__item--choice.is-highlighted {
  background-color: #8B4513;
  color: white;
}

.horsequip-choices__item--choice.is-selected {
  background-color: #f5f5f5;
  color: #333;
}

/* Hide the default dropdown arrow from the original select */
.horsequip-choices[data-type*="select-one"]:after {
  border-color: #666 transparent transparent transparent;
  border-style: solid;
  border-width: 5px 4px 0 4px;
  content: '';
  display: block;
  height: 0;
  pointer-events: none;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
}

.horsequip-choices.is-open[data-type*="select-one"]:after {
  transform: translateY(-50%) rotate(180deg);
}

.horsequip-input::placeholder {
  color: #999;
  font-style: normal;
}

.horsequip-input:focus,
.horsequip-select:focus {
  outline: none;
  background-color: #d0d0d0;
  border-bottom-color: #8B4513;
}

/* Submit button styling - using theme's action button pattern */
.horsequip-submit-btn {
  background: none;
  border: none;
  color: #333;
  font-size: 0.9rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  transition: color 0.3s ease;
  margin-top: 30px;
}

/* Flex wrapper for submit button with icon */
.submit-button-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
}

.submit-button-wrapper i {
    font-size: 24px;
    color: #ff940b;
    -webkit-text-stroke: 0;
}

.submit-button-wrapper .horsequip-submit-btn {
  margin-top: 0;
}

.submit-button-wrapper:hover i,
.submit-button-wrapper:hover .horsequip-submit-btn {
  color: #8B4513;
}

.horsequip-submit-btn:hover {
  color: #8B4513;
}

/* Status Messages Animation and Layout */
.messages-container {
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease-in-out;
  margin-bottom: 20px;
}

.messages-container.messages-visible {
  opacity: 1;
  transform: translateY(0);
}

.messages-container.messages-fade-out {
  opacity: 0;
  transform: translateY(-10px);
}

.messages {
  display: flex;
  align-items: flex-start;
  padding: 15px 20px;
  border-radius: 4px;
  margin-bottom: 0;
  font-family: 'Roboto', sans-serif;
}

.messages--status {
  background-color: #d4edda;
  border-left: 4px solid #ff940b;
  color: #155724;
}

.messages--error {
  background-color: #f8d7da;
  border-left: 4px solid #ff940b;
  color: #721c24;
}

.messages__icon {
  margin-right: 12px;
  margin-top: 2px;
}

.messages__icon i {
  font-size: 18px;
}

.messages--status .messages__icon i {
  color: #ff940b;
}

.messages--error .messages__icon i {
  color: #ff940b;
}

.messages__content {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.4;
}

.horsequip-submit-btn i {
  font-size: 24px;
  -webkit-text-stroke: 0;
}

/* Add fa-circle-arrow-right icon before submit button text */
.horsequip-submit-btn.with-icon::before {
  content: '\f35a';
  font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free', 'FontAwesome';
  font-weight: 900;
  font-size: 14px;
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

/* Forgot password link styling */
.horsequip-forgot-link {
  display: block;
  color: #333;
  text-decoration: underline;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  margin-top: 15px;
  transition: color 0.3s ease;
}

.horsequip-forgot-link:hover {
  color: #8B4513;
  text-decoration: none;
}

/* Checkbox styling to match screenshot */
.horsequip-checkbox {
  margin-bottom: 20px;
}

.form-item-terms {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 25px;
}

.form-item-terms input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  margin-top: 2px;
}

.form-item-terms label {
  display: block !important;
  font-size: 0.8rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  font-family: 'Roboto', sans-serif;
  line-height: 1.4;
  margin: 0;
  flex: 1;
}

.form-item-terms label strong {
  font-weight: 600;
  color: #333;
}

/* Password Reset Form Styling */
.horsequip-password-form {
  max-width: 100%;
}

.password-form-description {
  margin-bottom: 25px;
}

.password-form-description p {
  font-size: 0.9rem;
  font-weight: 300;
  color: #666;
  font-family: 'Roboto', sans-serif;
  line-height: 1.4;
  margin: 0;
}

/* Style the password form input fields to match */
.page-user-password .form-text,
.page-user-password .form-email {
  width: 100%;
  padding: 12px 15px;
  border: none;
  border-bottom: 1px solid #000;
  border-radius: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-shadow: none;
  outline: none;
  font-size: 0.9rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
  font-family: 'Roboto', sans-serif;
  background-color: transparent;
}

.page-user-password .form-text::placeholder,
.page-user-password .form-email::placeholder {
  color: #999;
  font-style: normal;
}

.page-user-password .form-text:focus,
.page-user-password .form-email:focus {
  outline: none;
  background-color: #d0d0d0;
  border-bottom-color: #8B4513;
}

/* Password form submit button */
.page-user-password .form-submit {
  background: none;
  border: none;
  color: #333;
  font-size: 0.9rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  font-family: 'Roboto', sans-serif;
  transition: color 0.3s ease;
  margin-top: 30px;
}

.page-user-password .form-submit:hover {
  color: #8B4513;
}

.page-user-password .form-submit::before {
  content: '\f0a9';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  font-size: 16px;
}

/* Hide labels for password form */
.page-user-password .form-item label {
  display: none;
}

/* Forgot Password Inline Section */
.forgot-password-section {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e0e0e0;
  animation: slideDown 0.3s ease-out;
}

.forgot-password-section .search-field-group {
  margin-bottom: 25px;
}

.forgot-password-cancel {
  margin-top: 20px;
  text-align: center;
}

.forgot-password-cancel .horsequip-forgot-link {
  font-size: 0.8rem;
  color: #666;
}

.forgot-password-cancel .horsequip-forgot-link:hover {
  color: #8B4513;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
  }
}

/* Smooth transitions for form switching */
.horsequip-login-form,
.forgot-password-section {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Clickable arrow icon styling */
.clickable-arrow {
  cursor: pointer;
  transition: all 0.3s ease;
  color: #333;
  font-size: 24px;
  margin-right: 15px;
  user-select: none;
}

.clickable-arrow:hover {
  color: #8B4513;
  transform: scale(1.1);
}

.clickable-arrow:focus {
  outline: 2px solid #8B4513;
  outline-offset: 2px;
  border-radius: 50%;
}

.submit-button-wrapper {
  display: flex;
  align-items: center;
  margin-top: 30px;
}