/* register.css - Registration page specific styles */

/* Password mismatch inline hint */
.passwordMismatchHint {
  display: none;
  align-items: center;
  gap: 6px;
  margin: -8px 0 4px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  color: #ef4444;
  font-size: 13px;
  font-weight: 500;
  animation: hintSlideIn 220ms ease;
}

.passwordMismatchHint.visible {
  display: flex;
}

.passwordMismatchHint svg {
  flex-shrink: 0;
}

@keyframes hintSlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Red border on confirm input when mismatch */
#registerPasswordConfirm.password-mismatch {
  border-color: #ef4444;
}

#registerPasswordConfirm.password-match {
  border-color: #10b981;
}

/* Telephone Input Group - same floating label logic as other fields */
.phoneGroup {
  position: relative;
  width: 100%;
}

.phoneGroup .iti {
  width: 100%;
  display: block;
  position: relative;
  z-index: 1;
}

.phoneGroup .inputLabel {
  z-index: 6;
}

.registerPhoneLabel {
  margin-left: 42px;
}

.phoneGroup #registerPhone {
  width: 100%;
  padding-left: 65px;
}

.phoneGroup.is-focused .inputLabel,
.phoneGroup.has-value .inputLabel {
  top: 0;
  font-size: 12px;
  background: #e8e8e8;
}

.phoneGroup.is-focused .inputLabel {
  color: var(--accent-cyan);
  background: #f5f5f5;
}

/* Phone validation states */
#registerPhone.phone-valid {
  border-color: #10b981;
}

#registerPhone.phone-invalid {
  border-color: #ef4444;
}

#registerPhone.phone-valid:focus,
.phoneGroup.is-focused #registerPhone.phone-valid {
  border-color: #10b981;
  background: #f0fdf4;
}

#registerPhone.phone-invalid:focus,
.phoneGroup.is-focused #registerPhone.phone-invalid {
  border-color: #ef4444;
  background: #fef2f2;
}

/* intl-tel-input Customization */
.iti {
  width: 100%;
  display: block;
}

.iti__country-list {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 200px;
}

.iti__country {
  padding: 8px 12px;
  color: #0b0b0b;
}

.iti__country:hover {
  background: #f5f5f5;
}

.iti__selected-flag {
  background: transparent;
  padding: 0 12px 0 20px;
}

.iti__flag-container {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
}

.iti__country-name,
.iti__dial-code {
  color: #0b0b0b !important;
}

@media (max-width: 768px) {
  #registerPhone,
  .iti__selected-flag,
  .iti__country,
  .iti__country-name,
  .iti__dial-code,
  .iti__search-input {
    font-size: 16px !important;
  }

  .iti__country-list {
    -webkit-text-size-adjust: 100%;
    touch-action: manipulation;
  }

  .iti--container,
  .iti__country-container,
  .iti__country-list,
  .iti--fullscreen-popup {
    z-index: 20050 !important;
  }
}

/* Select Field */
.selectField {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #e8e8e8;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}

.selectField:focus {
  background-color: #f5f5f5;
  /* Arrow azul no focus */
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2300D9FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

/* Select and Date Fields - Move label up when has value or focused */
.selectField:not([value=""]) + .inputLabel,
.selectField:focus + .inputLabel,
.dateField:not([value=""]) + .inputLabel,
.dateField:focus + .inputLabel {
  top: 0;
  font-size: 12px;
  color: #666;
  background: #e8e8e8;
}

.selectField:focus + .inputLabel,
.dateField:focus + .inputLabel {
  color: var(--accent-cyan);
  background: #f5f5f5;
}

/* Password Toggle */
.passwordToggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-normal);
  outline: none;
}

.passwordToggle:hover {
  color: var(--accent-cyan);
}

/* Terms Checkbox */
.termsCheckbox {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.termsCheckbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--accent-cyan);
  flex-shrink: 0;
}

.termsCheckbox label {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  cursor: pointer;
}

.termsCheckbox a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition-normal);
}

.termsCheckbox a:hover {
  color: #00a0cc;
  text-decoration: underline;
}
