/* =========================================================
 * TR SHOPPING — LOGIN / REGISTER
 * ========================================================= */

.tr-auth-page {
  width: 100%;
  padding: 40px 15px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.tr-auth-card {
  width: 100%;
  max-width: 460px;
  min-width: 0;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  box-sizing: border-box;
}

.tr-auth-heading {
  padding: 10px 20px;
  text-align: center;
}

.tr-auth-heading__title {
  margin: 0 0 5px;
  color: #222;
  font-size: 16px;
  line-height: 1.2;
}

.tr-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  margin: 8px 24px;
  padding: 3px;
  background: #f5f5f8;
  border-radius: 8px;
}

.tr-auth-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #666;
  box-shadow: none;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  text-indent: 0;
  visibility: visible;
  opacity: 1;
  cursor: pointer;
  box-sizing: border-box;
}

.tr-auth-tab:hover {
  background: #fff;
  color: var(--tr-myaccount-primary-hover);
}

.tr-auth-tab.is-active {
  background: #fff;
  border-color: #e7e7ef;
  color: var(--tr-myaccount-primary);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.tr-auth-panel {
  display: none;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 28px 28px;
  box-sizing: border-box;
}

.tr-auth-panel.is-active {
  display: block;
}

.tr-auth-form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0 !important;
  box-sizing: border-box;
}

.tr-auth-field {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.tr-auth-field label {
  display: block;
  color: #333;
  font-size: 12px;
  font-weight: 500;
}

.tr-auth-field .required {
  color: var(--tr-danger);
}

.tr-auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  gap: 10px;
  margin-bottom: 7px;
  box-sizing: border-box;
}

.tr-auth-label-row label {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.tr-auth-forgot {
  flex: 0 1 auto;
  min-width: 0;
  color: var(--tr-myaccount-primary);
  font-size: 11px;
  text-decoration: none;
  white-space: nowrap;
}

.tr-auth-forgot:hover {
  text-decoration: underline;
}

.tr-auth-input {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.tr-auth-input__icon {
  position: absolute;
  top: 50%;
  left: 12px;
  z-index: 2;
  color: #9aa0aa;
  font-size: 12px;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.tr-auth-input input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  margin: 0;
  padding: 0 38px 0 34px;
  box-sizing: border-box;
  border: 1px solid #e2e5eb;
  border-radius: 7px;
  background: #fff;
  color: #333;
  box-shadow: none;
  font-size: 12px;
}

.tr-auth-input input::placeholder {
  color: #b9bec8;
}

.tr-auth-input input:focus {
  border-color: var(--tr-myaccount-primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(108, 76, 241, 0.08);
}

.tr-auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  z-index: 3;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  color: #8b929d;
  box-shadow: none;
  cursor: pointer;
  font-size: 12px;
  line-height: 28px;
  transform: translateY(-50%);
}

.tr-auth-password-toggle:hover,
.tr-auth-password-toggle:focus,
.tr-auth-password-toggle:active {
  border: none;
  background: transparent;
  box-shadow: none;
  outline: none;
}

.tr-auth-login-options {
  margin: 2px 0 16px;
}

.tr-auth-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #777;
  font-size: 11px;
  cursor: pointer;
}

.tr-auth-checkbox input {
  width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
}

.tr-auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  height: 42px;
  min-height: 42px;
  gap: 8px;
  margin: 0;
  padding: 0 15px;
  border: none;
  border-radius: 7px;
  background: var(--tr-myaccount-primary) !important;
  color: #fff !important;
  box-shadow: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
  box-sizing: border-box;
}

.tr-auth-submit:hover {
  background: var(--tr-myaccount-primary-hover) !important;
  color: #fff !important;
}

.tr-auth-submit__arrow {
  font-size: 16px;
  line-height: 1;
}

.tr-auth-submit--register {
  background: var(--tr-myaccount-primary) !important;
}

.tr-auth-submit--register:hover {
  background: var(--tr-myaccount-primary-hover) !important;
}

.tr-auth-bottom {
  padding-top: 14px;
  color: #777;
  font-size: 11px;
  text-align: center;
  display: inline-flex;
}

.tr-auth-bottom a {
  color: var(--tr-myaccount-primary);
  font-weight: 600;
  text-decoration: none;
}

.tr-auth-bottom a:hover {
  text-decoration: underline;
}

.tr-auth-register-heading {
  margin-bottom: 20px;
}

.tr-auth-register-heading h2 {
  margin: 0 0 5px;
  color: #222;
  font-size: 16px;
}

.tr-auth-page .woocommerce-error,
.tr-auth-page .woocommerce-message,
.tr-auth-page .woocommerce-info {
  margin-bottom: 15px;
  font-size: 12px;
}

.tr-auth-panel .woocommerce-password-hint {
  display: none;
}

.tr-password-match-message {
  display: block;
  min-height: 16px;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.tr-password-match-message.is-matched {
  color: #16a34a;
}

.tr-password-match-message.is-not-matched {
  color: var(--tr-danger);
}


.tr-username-notice,
.tr-email-notice {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  color: #dc2626;
  opacity: 0;
  visibility: hidden;
  height: 0;
  min-height: 0;
  overflow: hidden;
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease;
}

.tr-username-notice.is-visible,
.tr-email-notice.is-visible {
  height: auto;
  min-height: 17px;
  opacity: 1;
  visibility: visible;
}


.tr-login-field-error {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 500;
  color: #dc2626;
  opacity: 0;
  visibility: hidden;
  height: 0;
  min-height: 0;
  overflow: hidden;
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease;
}

.tr-login-field-error.is-visible {
  height: auto;
  min-height: 16px;
  opacity: 1;
  visibility: visible;
}

.tr-auth-input input.has-error {
  border-color: #dc2626;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {
  .tr-auth-page {
    width: 100%;
    max-width: 100%;
    padding: 20px 10px;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .tr-auth-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 auto;
    border-radius: 10px;
    box-sizing: border-box;
  }

  .tr-auth-tabs {
    margin-right: 18px;
    margin-left: 18px;
  }

  .tr-auth-tab {
    min-width: 0;
    padding: 8px 6px;
    font-size: 11px;
  }

  .tr-auth-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0 18px 22px;
    overflow: hidden;
    box-sizing: border-box;
  }

  .tr-auth-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .tr-auth-input input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .tr-auth-label-row {
    width: 100%;
    min-width: 0;
    gap: 6px;
    box-sizing: border-box;
  }

  .tr-auth-label-row label {
    flex: 1 1 auto;
    min-width: 0;
  }

  .tr-auth-forgot {
    flex: 0 1 auto;
    min-width: 0;
    font-size: 10px;
    white-space: nowrap;
  }

  .tr-auth-submit {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .tr-auth-bottom {
    font-size: 10px;
  }
}