/* HaloCloud Cloud Studio — Auth Pages (Login, Register, Password Reset) */

/* Suppress native browser password reveal icons (Edge / IE) */
input::-ms-reveal,
input::-ms-clear {
  display: none !important;
}

.hc-theme .hc-auth {
  box-sizing: border-box;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 32px 36px 28px;
  background: var(--hc-bg-surface, #ffffff);
  border: 1px solid var(--hc-border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  height: auto !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  align-self: center !important;
}

.hc-theme .hc-auth--wide {
  max-width: 720px;
  padding: 32px 36px 28px;
}

.hc-theme .hc-auth--tfa {
  max-width: 420px;
}

/* Hide duplicate brand logo inside card */
.hc-theme .hc-auth__brand {
  display: none !important;
}

.hc-theme .hc-auth__intro {
  margin-bottom: 22px;
}

.hc-theme .hc-auth__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--hc-text-primary, #0f172a);
  letter-spacing: -0.01em;
}

.hc-theme .hc-auth__subtitle {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--hc-text-secondary, #64748b);
}

/* Sections in Register Page */
.hc-theme .hc-auth__section {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hc-border, #e2e8f0);
}

.hc-theme .hc-auth__section:last-of-type {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 16px;
}

.hc-theme .hc-auth__section-title {
  margin: 0 0 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--hc-text-primary, #0f172a);
  letter-spacing: -0.01em;
}

.hc-theme .hc-auth__section-title small {
  font-size: 12px;
  font-weight: 400;
  color: var(--hc-text-muted, #94a3b8);
}

/* Field Labels */
.hc-theme .hc-auth .hc-field__label,
.hc-theme .hc-auth label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--hc-text-primary, #0f172a);
}

/* Form Groups and Inputs */
.hc-theme .hc-auth .form-group,
.hc-theme .hc-auth .hc-field {
  margin-bottom: 15px;
}

.hc-theme .hc-auth input.hc-input,
.hc-theme .hc-auth select.hc-select,
.hc-theme .hc-auth input.form-control,
.hc-theme .hc-auth select.form-control {
  box-sizing: border-box !important;
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  font-size: 13.5px !important;
  line-height: 22px !important;
  background: var(--hc-bg-surface, #ffffff) !important;
  border: 1px solid var(--hc-border, #e2e8f0) !important;
  color: var(--hc-text-primary, #0f172a) !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.hc-theme .hc-auth input.hc-input:focus,
.hc-theme .hc-auth select.hc-select:focus,
.hc-theme .hc-auth input.form-control:focus,
.hc-theme .hc-auth select.form-control:focus {
  border-color: var(--hc-primary, #3164db) !important;
  box-shadow: 0 0 0 3px rgba(49, 100, 219, 0.12) !important;
  outline: none !important;
}

/* Unified Prepend Icon Inputs (Login & Register) */
.hc-theme .hc-auth .form-group.prepend-icon,
.hc-theme .hc-auth .hc-field-input-wrap {
  position: relative !important;
  margin-bottom: 15px !important;
}

.hc-theme .hc-auth .form-group.prepend-icon input.form-control,
.hc-theme .hc-auth .form-group.prepend-icon select.form-control,
.hc-theme .hc-auth .form-group.prepend-icon input.field,
.hc-theme .hc-auth .form-group.prepend-icon select.field,
.hc-theme .hc-auth .hc-field-input-wrap input.hc-input {
  padding-left: 38px !important;
}

.hc-theme .hc-auth .form-group.prepend-icon > .field-icon,
.hc-theme .hc-auth .form-group.prepend-icon > .field-icon-wrapper,
.hc-theme .hc-auth .hc-field-input-wrap > .field-icon {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: 38px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--hc-text-muted, #94a3b8) !important;
  font-size: 13.5px !important;
  pointer-events: none !important;
  z-index: 2 !important;
  line-height: 1 !important;
  transform: none !important;
}

.hc-theme .hc-auth .form-group.prepend-icon .field-icon i,
.hc-theme .hc-auth .hc-field-input-wrap .field-icon i {
  font-size: 13.5px !important;
}

/* Password Toggle Eye Button */
.hc-theme .hc-auth .hc-password-field {
  position: relative !important;
}

.hc-theme .hc-auth .hc-password-field input {
  padding-right: 38px !important;
}

.hc-theme .hc-auth .hc-auth__pw-toggle {
  position: absolute !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: 38px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  color: var(--hc-text-muted, #94a3b8) !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 6px 6px 0 !important;
  transition: color 0.15s ease !important;
  z-index: 3 !important;
}

.hc-theme .hc-auth .hc-auth__pw-toggle:hover {
  color: var(--hc-text-primary, #0f172a) !important;
}

.hc-theme .hc-auth .hc-auth__pw-toggle i {
  font-size: 13.5px !important;
}

/* Login Horizontal Options Row (Remember me + Forgot password?) */
.hc-theme .hc-auth__options-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-top: 10px !important;
  margin-bottom: 20px !important;
  gap: 12px !important;
}

.hc-theme .hc-auth__forgot {
  font-size: 12.5px !important;
  color: var(--hc-primary, #3164db) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  flex-shrink: 0 !important;
}

.hc-theme .hc-auth__forgot:hover {
  color: var(--hc-primary-hover, #2453be) !important;
  text-decoration: underline !important;
}

/* Custom Minimalist Checkbox (Clean, Square, Flat, SVG Check) */
.hc-theme .hc-auth .hc-auth__checkbox-label {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer !important;
  font-size: 13px !important;
  color: var(--hc-text-secondary, #64748b) !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

.hc-theme .hc-auth .hc-auth__checkbox {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  border-radius: 4px !important;
  border: 1px solid var(--hc-border, #cbd5e1) !important;
  background: #ffffff !important;
  cursor: pointer !important;
  outline: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
}

.hc-theme .hc-auth .hc-auth__checkbox:hover {
  border-color: var(--hc-primary, #3164db) !important;
}

.hc-theme .hc-auth .hc-auth__checkbox:checked {
  background-color: var(--hc-primary, #3164db) !important;
  border-color: var(--hc-primary, #3164db) !important;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E") !important;
  background-size: 100% 100% !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

/* International Phone Number Input (intl-tel-input) Fix */
.hc-theme .hc-auth .hc-field--phone {
  margin-bottom: 15px !important;
  position: relative !important;
}

.hc-theme .hc-auth .intl-tel-input {
  display: block !important;
  width: 100% !important;
  position: relative !important;
}

.hc-theme .hc-auth .intl-tel-input .flag-container {
  position: absolute !important;
  top: 1px !important;
  bottom: 1px !important;
  left: 1px !important;
  z-index: 4 !important;
  border-top-left-radius: 5px !important;
  border-bottom-left-radius: 5px !important;
  background: var(--hc-bg-subtle, #f8fafc) !important;
  border-right: 1px solid var(--hc-border, #e2e8f0) !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 8px 0 10px !important;
}

.hc-theme .hc-auth .intl-tel-input .selected-flag {
  display: flex !important;
  align-items: center !important;
  height: 100% !important;
  padding: 0 !important;
  background: transparent !important;
  width: auto !important;
  cursor: pointer !important;
}

.hc-theme .hc-auth .intl-tel-input .selected-flag .iti-flag {
  position: static !important;
  margin: 0 !important;
  transform: none !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
}

.hc-theme .hc-auth .intl-tel-input .selected-flag .selected-dial-code {
  display: inline-block !important;
  padding-left: 0 !important;
  margin-left: 6px !important;
  margin-right: 4px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--hc-text-primary, #0f172a) !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.hc-theme .hc-auth .intl-tel-input .selected-flag .iti-arrow {
  position: static !important;
  margin-left: 2px !important;
  margin-top: 0 !important;
  border-top-color: #64748b !important;
  flex-shrink: 0 !important;
}

.hc-theme .hc-auth .intl-tel-input input[type="tel"] {
  padding-left: 100px !important;
  height: 40px !important;
  min-height: 40px !important;
  font-size: 13.5px !important;
  box-sizing: border-box !important;
  width: 100% !important;
}

/* Modern Mailing List Toggle Card */
.hc-theme .hc-auth__marketing-card {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 12px 16px !important;
  background: var(--hc-bg-subtle, #f8fafc) !important;
  border: 1px solid var(--hc-border, #e2e8f0) !important;
  border-radius: 8px !important;
  margin-top: 6px !important;
}

.hc-theme .hc-auth__marketing-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.hc-theme .hc-auth__marketing-title {
  margin: 0 0 2px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: var(--hc-text-primary, #0f172a) !important;
}

.hc-theme .hc-auth__marketing-desc {
  margin: 0 !important;
  font-size: 12px !important;
  color: var(--hc-text-secondary, #64748b) !important;
  line-height: 1.4 !important;
}

/* Modern iOS-style Switch */
.hc-theme .hc-auth__switch {
  position: relative !important;
  display: inline-block !important;
  width: 40px !important;
  height: 22px !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
}

.hc-theme .hc-auth__switch-input {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
  margin: 0 !important;
}

.hc-theme .hc-auth__switch-slider {
  position: absolute !important;
  cursor: pointer !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-color: #cbd5e1 !important;
  transition: all 0.2s ease !important;
  border-radius: 22px !important;
}

.hc-theme .hc-auth__switch-slider::before {
  position: absolute !important;
  content: "" !important;
  height: 16px !important;
  width: 16px !important;
  left: 3px !important;
  bottom: 3px !important;
  background-color: white !important;
  transition: all 0.2s ease !important;
  border-radius: 50% !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

.hc-theme .hc-auth__switch-input:checked + .hc-theme .hc-auth__switch-slider,
.hc-theme .hc-auth input:checked + .hc-auth__switch-slider {
  background-color: var(--hc-primary, #3164db) !important;
}

.hc-theme .hc-auth__switch-input:checked + .hc-theme .hc-auth__switch-slider::before,
.hc-theme .hc-auth input:checked + .hc-auth__switch-slider::before {
  transform: translateX(18px) !important;
}

/* Terms Checkbox in Register */
.hc-theme .hc-auth__terms {
  margin: 16px 0 20px !important;
}

.hc-theme .hc-auth__terms a {
  color: var(--hc-primary, #3164db) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.hc-theme .hc-auth__terms a:hover {
  text-decoration: underline !important;
}

/* Primary Action Buttons */
.hc-theme .hc-auth button[type="submit"],
.hc-theme .hc-auth .btn.btn-primary,
.hc-theme .hc-auth .hc-button--primary {
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  padding: 0 20px !important;
  border-radius: 6px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  background: var(--hc-primary, #3164db) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transition: background-color 0.15s ease !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.hc-theme .hc-auth button[type="submit"]:hover,
.hc-theme .hc-auth .btn.btn-primary:hover,
.hc-theme .hc-auth .hc-button--primary:hover {
  background: var(--hc-primary-hover, #2453be) !important;
  color: #ffffff !important;
  transform: none !important;
}

/* Footer Link Area (Create Account / Sign in) */
.hc-theme .hc-auth__footer-text {
  margin: 18px 0 0 !important;
  padding-top: 16px !important;
  border-top: 1px solid var(--hc-border, #e2e8f0) !important;
  font-size: 13px !important;
  color: var(--hc-text-secondary, #64748b) !important;
  text-align: center !important;
}

.hc-theme .hc-auth__register-link {
  font-weight: 600 !important;
  color: var(--hc-primary, #3164db) !important;
  text-decoration: none !important;
  margin-left: 4px !important;
}

.hc-theme .hc-auth__register-link:hover {
  color: var(--hc-primary-hover, #2453be) !important;
  text-decoration: underline !important;
}

/* Generate Password Button */
.hc-theme .hc-auth .generate-password {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  background: var(--hc-bg-subtle, #f8fafc) !important;
  border: 1px solid var(--hc-border, #e2e8f0) !important;
  color: var(--hc-text-primary, #0f172a) !important;
  border-radius: 6px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.hc-theme .hc-auth .generate-password:hover {
  background: #f1f5f9 !important;
  border-color: var(--hc-border-hover, #cbd5e1) !important;
  color: var(--hc-primary, #3164db) !important;
}

/* Password Strength Meter */
.hc-theme .hc-auth .password-strength-meter .progress {
  height: 6px !important;
  border-radius: 3px !important;
  background: #e2e8f0 !important;
  margin-top: 6px !important;
  margin-bottom: 6px !important;
  overflow: hidden !important;
}

/* Captcha Wrap */
.hc-theme .hc-auth__captcha-wrap {
  display: flex !important;
  justify-content: center !important;
  margin-bottom: 16px !important;
}

/* Responsive adjustments */
@media (max-width: 767px) {
  .hc-theme .hc-auth {
    padding: 24px 20px 20px;
    margin: 12px auto;
  }
  .hc-theme .hc-auth--wide {
    padding: 24px 20px 20px;
  }
}
