/* Register form, inputs, and helpers */
.register-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.form-group label {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group select {
  background: #1a0d12;
  border: 1px solid rgba(247, 147, 26, 0.2);
  border-radius: 8px;
  padding: 11px 14px;
  color: #fff;
  font-size: 0.95rem;
  font-family: inherit;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-group input::placeholder {
  color: #888;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #f7931a;
  box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.1);
  background: #1a0d12;
}

.form-group input:valid {
  border-color: rgba(76, 175, 80, 0.4);
}

.form-group input:invalid:not(:placeholder-shown) {
  border-color: rgba(244, 67, 54, 0.4);
}

/* Select styling */
.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23f7931a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-group select option {
  background: #220F17;
  color: #fff;
}

/* Checkbox group */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.2;
  cursor: pointer;
  transition: color 0.2s ease;
}

.checkbox-label:hover {
  color: #f7931a;
}

.checkbox-label input[type="checkbox"] {
  width: 12px;
  height: 12px;
  cursor: pointer;
  appearance: none;
  border: 1px solid #f7931a;
  border-radius: 4px;
  background: transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:hover {
  background: rgba(247, 147, 26, 0.1);
}

.checkbox-label input[type="checkbox"]:checked {
  background: #f7931a;
  border-color: #f7931a;
  position: relative;
}

.checkbox-label input[type="checkbox"]:checked::after {
  content: '\2713';
  position: absolute;
  color: #220F17;
  font-size: 12px;
  font-weight: bold;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.checkbox-label .link {
  color: #f4a64a;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.checkbox-label .link:hover {
  border-bottom-color: #f7931a;
}

/* Password strength */
.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.strength-bar {
  flex: 1;
  height: 6px;
  background: #1a0d12;
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(247, 147, 26, 0.1);
}

.strength-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 0%;
  background: #f44336;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.strength-bar.weak::after {
  width: 33%;
  background: #f44336;
}

.strength-bar.fair::after {
  width: 66%;
  background: #ff9800;
}

.strength-bar.strong::after {
  width: 100%;
  background: #4caf50;
}

.strength-text {
  font-size: 0.8rem;
  min-width: 60px;
  color: #aaa;
  text-align: right;
}

.strength-text.weak {
  color: #f44336;
}

.strength-text.fair {
  color: #ff9800;
}

.strength-text.strong {
  color: #4caf50;
}

/* Submit button */
.register-submit-btn {
  margin-top: 8px;
  height: 48px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.register-submit-btn:hover:not(:disabled) {
  background: #6B0F0F !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 147, 26, 0.3);
}

.register-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error message */
.register-error {
  color: #f44336;
  font-size: 0.85rem;
  text-align: center;
  min-height: 24px;
  padding: 8px 12px;
  background: rgba(244, 67, 54, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(244, 67, 54, 0.2);
  margin-top: 8px;
  display: none;
}

.register-error.visible {
  display: block;
}

/* Social login divider */
.social-login-divider {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  margin: 20px 0;
  position: relative;
}

.social-login-divider::before,
.social-login-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 12px);
  height: 1px;
  background: rgba(247, 147, 26, 0.1);
}

.social-login-divider::before {
  left: 0;
}

.social-login-divider::after {
  right: 0;
}

/* Google login button */
.google-login-container {
  width: 100%;
}

.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  background: #1a0d12;
  border: 1px solid rgba(247, 147, 26, 0.2);
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.google-login-btn:hover {
  background: rgba(247, 147, 26, 0.1);
  border-color: #f7931a;
}

.google-logo {
  width: 20px;
  height: 20px;
}

/* Login link */
.register-login-link {
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 16px;
}

.register-login-link .link {
  color: #f7931a;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.register-login-link .link:hover {
  border-bottom-color: #f7931a;
}

/* Optional exact location */
.location-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.location-btn {
  padding: 8px 12px;
  font-size: 0.85rem;
  min-width: 170px;
}

.location-status {
  color: #999;
  font-size: 0.85rem;
}

.location-status.neutral {
  color: #999;
}

.location-status.success {
  color: #4caf50;
}

.location-status.error {
  color: #f44336;
}

/* Mostrar/ocultar campos de DO y continentes */
#do-group.hidden-category,
#continentes-group.hidden-category {
  display: none !important;
}

#do-group.visible-category,
#continentes-group.visible-category {
  display: block !important;
}

/* Validation color classes */
.input-error {
  border-color: rgba(244, 67, 54, 0.4) !important;
}

.input-success {
  border-color: rgba(76, 175, 80, 0.4) !important;
}

/* Focus ring for accessibility */
.form-group input:focus-visible,
.form-group select:focus-visible,
.keystore-btn:focus-visible,
.checkbox-label input:focus-visible {
  outline: 2px solid #f7931a;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .checkbox-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .form-group input,
  .form-group select {
    padding: 10px 12px;
    font-size: 16px;
  }
}

/* Multi-select styling (para DO, Variedades, Tipos) */
.multi-select {
  cursor: pointer;
  background-image: none !important;
  padding: 8px 12px !important;
  appearance: auto;
  max-height: 150px;
}

.multi-select option {
  padding: 6px 10px;
  cursor: pointer;
}

.multi-select option:checked {
  background: linear-gradient(0deg, rgba(247, 147, 26, 0.3) 0%, rgba(247, 147, 26, 0.3) 100%);
  color: #fff;
}

.multi-select option:hover {
  background: rgba(247, 147, 26, 0.15);
}

/* Form hint (texto de ayuda) */
.form-hint {
  color: #888;
  font-size: 0.8rem;
  font-style: italic;
  margin-top: -2px;
  display: block;
}
