/* =============================================================================
   forms.css — Form component styles
   Ported from Vue/Quasar extracted CSS (no SCSS, no Quasar classes)
   ============================================================================= */

/* === Trading Form === */
.g70ie {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: visible;
  padding: 0.25rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (min-width: 360px) {
  .g70ie {
    gap: 0.5rem;
    padding: 0.375rem;
  }
}

@media (min-width: 400px) {
  .g70ie {
    gap: 0.75rem;
    padding: 0.625rem;
  }
}

@media (min-width: 430px) {
  .g70ie {
    gap: 1rem;
    padding: 1rem;
  }
}

@media (min-width: 768px) {
  .g70ie {
    gap: 1.25rem;
    padding: 1.25rem;
  }
}

.zg8xf {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.5rem;
  background: var(--dx6);
  border: 1px solid var(--c53bd);
  border-radius: 8px;
  color: var(--bgjx);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-sizing: border-box;
  box-shadow: 0 3px 8px var(--r9u);
}

@media (min-width: 360px) {
  .form-input {
    padding: 0.625rem 0.625rem;
    font-size: 0.875rem;
    border-radius: 9px;
  }
}

@media (min-width: 400px) {
  .form-input {
    padding: 0.75rem 0.875rem;
    font-size: 0.9rem;
    border-radius: 10px;
  }
}

@media (min-width: 430px) {
  .form-input {
    padding: 0.875rem 1.125rem;
    font-size: 0.95rem;
    border-radius: 11px;
  }
}

@media (min-width: 768px) {
  .form-input {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border-radius: 12px;
  }
}

.form-input::placeholder {
  color: var(--w8d6ct);
  font-weight: 400;
}

.form-input:hover:not(:focus) {
  background: var(--hji9n);
  border-color: var(--color-purple-35);
  box-shadow: 0 2px 4px var(--pet8l);
}

.form-input:focus {
  outline: none;
  background: var(--awig7a);
  border-color: var(--scytl0);
  box-shadow: 0 0 0 3px var(--ntd),
    0 6px 16px var(--sij5);
  transform: translateY(-1px);
}

.form-input.error {
  border-color: var(--fb19e);
  background: var(--lzd8x);
  box-shadow: 0 0 0 3px var(--ia7);
}

.ziy1xp8 {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--fb19e);
  margin-bottom: 0;
}

.b30b7ndgwwb {
  width: 100%;
  padding: 0.75rem 0.5rem;
  background: var(--i8tzz);
  border: none;
  border-radius: 8px;
  min-height: 60px;
  color: var(--color-white);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 12px var(--ngpitt);
  margin-top: 0.25rem;
  box-sizing: border-box;
}

@media (min-width: 360px) {
  .b30b7ndgwwb {
    padding: 0.75rem 0.625rem;
    font-size: 0.9rem;
    border-radius: 9px;
    margin-top: 0.375rem;
  }
}

@media (min-width: 400px) {
  .b30b7ndgwwb {
    padding: 0.875rem 0.875rem;
    font-size: 0.95rem;
    border-radius: 10px;
    margin-top: 0.4375rem;
  }
}

@media (min-width: 430px) {
  .b30b7ndgwwb {
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    border-radius: 11px;
    margin-top: 0.5rem;
  }
}

@media (min-width: 768px) {
  .b30b7ndgwwb {
    padding: 1.125rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 12px;
  }
}

@media (max-width: 450px) {
  .g70ie {
    gap: 0.65rem;
    padding: 0.45rem;
  }

  .b30b7ndgwwb {
    padding: 0.75rem 0.6rem;
    font-size: 0.85rem;
    border-radius: 9px;
    min-height: 56px;
  }
}

@media (max-width: 360px) {
  .g70ie {
    gap: 0.5rem;
    padding: 0.35rem;
  }

  .b30b7ndgwwb {
    padding: 0.7rem 0.55rem;
    font-size: 0.82rem;
    border-radius: 8px;
    min-height: 52px;
  }
}

@media (max-width: 330px) {
  .g70ie {
    gap: 0.45rem;
    padding: 0.7rem 0.25rem;
  }

  .b30b7ndgwwb {
    padding: 0.65rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 7px;
    min-height: 48px;
  }
}

.b30b7ndgwwb::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-white-18),
    transparent
  );
  transition: left 0.5s ease;
}

.b30b7ndgwwb:hover:not(:disabled) {
  transform: translateY(-3px);
  background: var(--wa63x);
  box-shadow: 0 2px 6px var(--jp3);
}

.b30b7ndgwwb:hover:not(:disabled)::before {
  left: 100%;
}

.b30b7ndgwwb:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px 0 rgba(122, 107, 255, 0.32),
    0 0 0 1px var(--color-white-10) inset;
}

.b30b7ndgwwb:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--sxw8, var(--button-gradient, rgba(255,255,255,0.15)));
  box-shadow: none;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ow2hzfx {
  animation: spin 1s linear infinite;
  width: 20px;
  height: 20px;
}

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

.q0mn0ce9,
.cix7jy5i {
  padding: 0.75rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 0.375rem;
  animation: slideDown 0.3s ease;
}

@media (min-width: 360px) {
  .q0mn0ce9,
  .cix7jy5i {
    padding: 0.875rem;
    font-size: 0.9rem;
    border-radius: 9px;
    margin-bottom: 0.4375rem;
  }
}

@media (min-width: 430px) {
  .q0mn0ce9,
  .cix7jy5i {
    padding: 1rem;
    font-size: 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
  }
}

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

.q0mn0ce9 {
  background: var(--ic97pb);
  border: 1px solid var(--tuphei);
  color: var(--xwch);
  box-shadow: 0 2px 6px var(--cud);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.wkn0hite {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--xwch, #16a34a);
}

.q0mn0ce9 p {
  margin: 0;
}

.cix7jy5i {
  background: var(--rl89rs);
  border: 1px solid var(--owfeta);
  color: var(--fb19e);
  box-shadow: 0 2px 6px var(--isgf71);
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* Form agreement / checkbox */
.fpfdbp {
  margin-top: 0.25rem;
}

.w77hwkg6x5p {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
}

.d11ldr {
  flex-shrink: 0;
  margin-top: 3px;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-purple-55, #7a6bff);
}

.d4vt9 {
  font-size: 0.7rem;
  line-height: 1.45;
  color: var(--czp, #999);
}

.d4vt9 a {
  color: var(--link-color, var(--o8k));
  text-decoration: underline;
}

.d4vt9 a:hover {
  color: var(--link-hover, var(--color-purple));
}

.bilyl {
  margin-top: 0.5rem;
  font-size: 0.65rem;
  line-height: 1.4;
  color: var(--czp, #999);
}

.bilyl a {
  color: var(--link-color, var(--o8k));
  text-decoration: underline;
}

.bilyl a:hover {
  color: var(--link-hover, var(--color-purple));
}

/* === Phone Input === */
.phone-input-wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.w7s0i8mh {
  display: block;
  margin-bottom: 6px;
  color: var(--bgjx);
  font-size: 13px;
  font-weight: 600;
}

@media (min-width: 360px) {
  .w7s0i8mh {
    margin-bottom: 7px;
    font-size: 13.5px;
  }
}

@media (min-width: 430px) {
  .w7s0i8mh {
    margin-bottom: 8px;
    font-size: 14px;
  }
}

.phone-container {
  display: flex;
  gap: 0;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.country-selector {
  position: relative;
  flex-shrink: 0;
}

.country-display {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: var(--dx6);
  border: 1px solid var(--c53bd);
  border-right: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  height: 44px;
  box-sizing: border-box;
}

@media (min-width: 360px) {
  .country-display {
    padding: 9px;
    gap: 7px;
    height: 48px;
    border-radius: 9px 0 0 9px;
  }
}

@media (min-width: 400px) {
  .country-display {
    padding: 10px;
    gap: 8px;
    height: 52px;
    border-radius: 11px 0 0 11px;
  }
}

@media (min-width: 430px) {
  .country-display {
    padding: 12px;
    gap: 8px;
    height: 59px;
    border-radius: 14px 0 0 14px;
  }
}

.country-display:hover {
  background: var(--hji9n);
  border-color: var(--color-purple-35);
  box-shadow: 0 2px 4px var(--pet8l);
}

.country-display.active {
  background: var(--awig7a);
  border-color: var(--scytl0);
}

.country-code {
  color: var(--czp);
  font-weight: 500;
  font-size: 13px;
}

@media (min-width: 360px) {
  .country-code {
    font-size: 13.5px;
  }
}

@media (min-width: 430px) {
  .country-code {
    font-size: 14px;
  }
}

.dropdown-arrow {
  transition: transform 0.3s ease;
}

.dropdown-arrow.rotate {
  transform: rotate(180deg);
}

.country-dropdown {
  position: absolute;
  left: 0;
  right: 0;
  background: var(--phone-dropdown-bg);
  border: 1px solid var(--u8n782);
  border-radius: 16px;
  box-shadow: var(--phone-dropdown-shadow);
  z-index: 99999;
  max-height: 400px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.country-search {
  padding: 12px;
  border-bottom: 1px solid var(--u8n782);
  background: var(--phone-search-bg);
}

.country-search input {
  width: 100%;
  padding: 8px 12px;
  background: var(--phone-search-input-bg);
  border: 1px solid var(--u8n782);
  border-radius: 10px;
  color: var(--bgjx);
  font-size: 14px;
  outline: none;
}

.country-search input::placeholder {
  color: var(--czp);
}

.country-search input:focus {
  background: var(--phone-search-focus-bg);
  border-color: var(--phone-search-focus-border);
  box-shadow: var(--phone-search-focus-shadow);
}

.country-list {
  overflow-y: auto;
  max-height: 320px;
  padding: 4px;
}

.country-list::-webkit-scrollbar {
  width: 6px;
}

.country-list::-webkit-scrollbar-track {
  background: var(--phone-list-scrollbar-track);
}

.country-list::-webkit-scrollbar-thumb {
  background: var(--phone-list-scrollbar-thumb);
  border-radius: 3px;
}

.country-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  border-radius: 10px;
}

.country-item:hover {
  background: var(--phone-item-hover-bg);
  transform: translateX(4px);
}

.country-item.active {
  background: var(--phone-item-active-bg);
}

.country-name {
  flex: 1;
  color: var(--bgjx);
  font-size: 14px;
  font-weight: 500;
}

.country-dial {
  color: var(--czp);
  font-size: 13px;
}

.phone-input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  background: var(--dx6);
  border: 1px solid var(--c53bd);
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: var(--bgjx);
  font-weight: 600;
  font-size: 14px;
  outline: none;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  height: 44px;
  box-sizing: border-box;
}

@media (min-width: 360px) {
  .phone-input {
    padding: 9px 12px;
    font-size: 15px;
    height: 48px;
    border-radius: 0 9px 9px 0;
  }
}

@media (max-width: 330px) {
  .phone-input {
    padding: 9px 12px;
    font-size: 15px;
    height: 48px;
    border-radius: 0 9px 9px 0;
  }
}

@media (min-width: 400px) {
  .phone-input {
    padding: 10px 14px;
    font-size: 15.5px;
    height: 52px;
    border-radius: 0 11px 11px 0;
  }
}

@media (min-width: 430px) {
  .phone-input {
    padding: 12px 16px;
    font-size: 16px;
    height: 59px;
    border-radius: 0 14px 14px 0;
  }
}

.phone-input::placeholder {
  color: var(--w8d6ct);
}

.phone-input:focus {
  background: var(--awig7a);
  border-color: var(--scytl0);
  box-shadow: 0 0 0 3px var(--ntd),
    0 6px 16px var(--sij5);
}

.phone-error {
  color: var(--input-error-color);
  font-size: 12px;
  margin-top: 4px;
}

/* Phone dropdown animation */
.dropdown-enter-active,
.dropdown-leave-active {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.dropdown-enter-from,
.dropdown-leave-to {
  opacity: 0;
  transform: translateY(-10px);
}

@media (max-width: 450px) {
  .w7s0i8mh {
    margin-bottom: 5px;
    font-size: 12.5px;
  }

  /* Match .form-input height in this breakpoint: padding 10px on the input,
     country-display follows the same vertical rhythm. Drop the explicit
     `height` so both sides scale with font-size like the text inputs above. */
  .country-display {
    padding: 10px 10px;
    gap: 5px;
    height: auto;
    align-self: stretch;
    border-radius: 9px 0 0 9px;
  }

  .country-code {
    font-size: 13px;
  }

  .phone-input {
    padding: 10px 12px;
    font-size: 14px;
    height: auto;
    border-radius: 0 9px 9px 0;
  }
}

@media (max-width: 360px) {
  .w7s0i8mh {
    font-size: 12px;
  }

  .country-display {
    padding: 6px;
    gap: 4px;
    height: 40px;
    border-radius: 6px 0 0 6px;
  }

  .country-code {
    font-size: 12px;
  }

  .phone-input {
    padding: 7px 9px;
    font-size: 13.5px;
    height: 40px;
    border-radius: 0 6px 6px 0;
  }

  .dropdown-arrow {
    width: 10px;
    height: 6px;
  }
}

@media (max-width: 330px) {
  .w7s0i8mh {
    font-size: 11.5px;
    margin-bottom: 4px;
  }

  .country-display {
    padding: 5px;
    gap: 4px;
    height: 38px;
    border-radius: 5px 0 0 5px;
  }

  .country-code {
    font-size: 12px;
  }

  .phone-input {
    padding: 6px 8px;
    font-size: 13px;
    height: 38px;
    border-radius: 0 5px 5px 0;
  }

  .dropdown-arrow {
    width: 9px;
    height: 5px;
  }
}

/* Fallback mode: full border all sides */
.phone-container--fallback .phone-input {
  border-left: 1px solid var(--u8n782);
  border-radius: 8px;
  max-width: none;
}

@media (min-width: 360px) {
  .phone-container--fallback .phone-input {
    border-radius: 9px;
  }
}

@media (min-width: 400px) {
  .phone-container--fallback .phone-input {
    border-radius: 11px;
  }
}

@media (min-width: 430px) {
  .phone-container--fallback .phone-input {
    border-radius: 14px;
  }
}

@media (max-width: 450px) {
  .phone-container--fallback .phone-input {
    border-radius: 7px;
  }
}

@media (max-width: 360px) {
  .phone-container--fallback .phone-input {
    border-radius: 6px;
    max-width: none;
  }
}

@media (max-width: 330px) {
  .phone-container--fallback .phone-input {
    border-radius: 5px;
    max-width: none;
  }
}

.phone-mask-notice {
  color: var(--czp, #999);
  font-size: 12px;
  margin-top: 6px;
  line-height: 1.4;
}

/* === intlTelInput overrides (when using library) === */
.iti {
  width: 100%;
}

.iti__flag-container {
  padding: 0;
}

.iti__selected-flag {
  background: var(--phone-country-bg);
  border: 1px solid var(--u8n782);
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 0 10px;
}

.iti__selected-flag:hover {
  background: var(--phone-country-hover-bg);
}

.iti__country-list {
  background: var(--phone-dropdown-bg);
  border: 1px solid var(--u8n782);
  border-radius: 12px;
  box-shadow: var(--phone-dropdown-shadow);
  z-index: 99999;
}

.iti__country:hover,
.iti__country.iti__highlight {
  background: var(--phone-item-hover-bg);
}

.iti__country-name {
  color: var(--bgjx);
}

.iti__dial-code {
  color: var(--czp);
}

.iti__search-input {
  background: var(--phone-search-input-bg);
  border: 1px solid var(--u8n782);
  border-radius: 8px;
  color: var(--bgjx);
}

.iti__search-input::placeholder {
  color: var(--czp);
}

/* Phone input when using intlTelInput */
.iti input[type="tel"] {
  width: 100%;
  background: var(--phone-input-bg);
  border: 1px solid var(--u8n782);
  border-radius: 8px;
  color: var(--bgjx);
  font-size: 14px;
  padding: 0.625rem 0.5rem 0.625rem 52px;
  height: 44px;
  box-sizing: border-box;
  outline: none;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.iti input[type="tel"]:focus {
  background: var(--phone-input-focus-bg);
  border-color: var(--phone-input-focus-border);
  box-shadow: var(--phone-input-focus-shadow);
}

.iti input[type="tel"]::placeholder {
  color: var(--czp);
}

/* =============================================================================
   Phone mask fallback (PhoneInput.vue maskDisabled state)
   Shown when user fails validation FAIL_THRESHOLD times and settings.seo.weakModeration === true
   ============================================================================= */

.opzft0qiro {
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(255, 193, 7, 0.1);
  border-left: 3px solid rgba(255, 193, 7, 0.6);
  color: var(--czp);
  font-size: 0.8125rem;
  border-radius: 4px;
}

.form-input--fallback {
  border-color: rgba(255, 193, 7, 0.5);
}

/* Email autocomplete dropdown */
.email-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--h8jx, #fff);
  border: 1px solid var(--u8n782, rgba(0, 0, 0, 0.1));
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 4px;
}

.email-autocomplete__item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 0.9375rem;
  color: var(--bgjx, #333);
  transition: background 150ms ease;
}

.email-autocomplete__item:hover,
.email-autocomplete__item--selected {
  background: rgba(91, 143, 249, 0.1);
  color: var(--o8k, #5B8FF9);
}

/* Fix 2: Disabled submit button state */
.g3a9vh5dr0v7n[disabled],
.form-submit-button--disabled,
.b30b7ndgwwb[disabled],
.a4tuxbboqxp {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
