/* ============================================
   LoginForm.css - Modern Login/Signup Form
   ============================================ */

/* === Reset & Base === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0;
  height: auto;
  font-family:
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  background: transparent;
  width: 100% !important;
}

body:has(.client-login-ctn.dark) .client-modal {
  background-color: #141d2d !important;
}

/* === Container === */
.client-modal>div:has(.client-login-ctn) {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  margin: 0 auto !important;
  padding: 0;
  background: transparent !important;
}

#client-rem {
  padding: 0 !important;
}

.client-login-ctn {
  font-family:
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  border-radius: 16px;
  overflow: hidden;
}

.client-login-ctn {
  background-color: white;
}

.client-login-ctn.notRounded {
  border-radius: 0 !important;
}

.client-login-ctn.dark {
  background-color: #141d2d !important;
}

/* === Header / Welcome Section === */
.login-header {
  background: linear-gradient(90deg, #111a2b 0%, #354052 100%);
  text-align: center;
  padding: 30px 20px 20px;
  position: relative;
}

.login-header .close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.login-header .close-btn:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.login-header .avatar-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 5px;
}

.login-header .avatar-icon svg {
  width: 32px;
  height: 32px;
  fill: rgba(255, 255, 255, 0.7);
}

.login-header h2 {
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 4px;
}

.client-login-ctn input,
.client-login-ctn select {
  background-color: #f5f5f5 !important;
  color: black !important;
}

.client-login-ctn input::placeholder {
  color: rgba(0, 0, 0, 0.3) !important;
}

.client-login-ctn.dark input,
.client-login-ctn.dark select {
  background-color: #101828 !important;
  color: #fff !important;
}

.client-login-ctn.dark input::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

.UIv6 label {
  color: black;
}

.client-login-ctn.dark .logininputs h4,
.client-login-ctn.dark.form-label,
.client-login-ctn.dark .add-client-input-post label,
.client-login-ctn.dark .UIv6 label,
.client-login-ctn.dark .signup-side p,
.client-login-ctn.dark .login-header h2,
.client-login-ctn.dark .logininputs h4,
.client-login-ctn.dark .bottom-link,
.client-login-ctn.dark .temp-side>div .field label {
  color: rgba(255, 255, 255, 1) !important;
}

.login-header p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  margin: 0;
}

/* === Tabs === */
.tabs-wrapper {
  display: flex;
  background: #0b1120;
}

.client-tab {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none !important;
  margin: 0 !important;
  border-radius: 0 !important;
  transition: all 0.2s ease;
  display: block;
  float: none;
  width: auto;
  position: relative;
  z-index: 1;
  background: #101828 !important;
  color: #fff !important;
}

.selected-tab {
  background: white !important;
  color: #000 !important;
}

/* === Form Body === */
.temp-side {
  background: transparent;
  border-radius: 0 0 16px 16px !important;
  height: auto !important;
  top: -1px;
  position: relative;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.login-side>form,
.login-side>form.login-form {
  padding: 24px 28px 28px !important;
  background-color: transparent !important;
  width: 100% !important;
  position: relative;
  top: 0 !important;
  text-align: left;
  border-radius: 0 0 16px 16px !important;
}

.signup-side {
  padding: 0;
}

.signup-side .add-client-input-post>div {
  padding: 24px 28px 28px !important;
  background-color: transparent !important;
  border-radius: 0 0 16px 16px !important;
}

/* === Alert / Error Messages === */
.login-error-msg {
  background: rgba(206, 82, 44, 0.08);
  border: 1px solid rgba(226, 22, 22, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 20px;
  color: #e04444;
  font-size: 13px;
  text-align: center;
}

.existingz {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 0 28px 16px;
  text-align: center;
}

.existingz h3 {
  font-size: 13px !important;
  font-weight: 500 !important;
  margin: 0 !important;
  color: #93c5fd !important;
}

.existingz h3 font {
  color: #93c5fd !important;
}

/* === Form Labels === */
.logininputs h4,
.form-label,
.add-client-input-post label,
.UIv6 label {
  font-size: 13px !important;
  font-weight: 400 !important;
  margin: 0 0 6px !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logininputs h4 {
  margin-top: 16px !important;
}

.form-label .label-icon {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

/* === Input Fields === */
.client-login-ctn input[type="text"],
.client-login-ctn input[type="email"],
.client-login-ctn input[type="password"],
.client-login-ctn .input,
.client-login-ctn .add-client-input-post input,
.client-login-ctn input {
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-style: normal !important;
  font-family:
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    Roboto,
    Helvetica,
    Arial,
    sans-serif !important;
  height: 44px !important;
  padding: 0 14px !important;
  width: 100% !important;
  outline: none;
  transition: border-color 0.2s ease;
}

.client-login-ctn input::placeholder {
  color: rgba(114, 114, 114, 0.3) !important;
  font-style: normal !important;
}

.client-login-ctn input:focus {
  border-color: rgb(17, 26, 43) !important;
}

/* === Input Field Wrapper (for icons) === */
.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper .field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  opacity: 0.4;
  pointer-events: none;
}

.input-wrapper.has-icon input {
  padding-left: 38px !important;
}

.input-wrapper .toggle-password {
  position: absolute;
  right: 0px;
  top: 7px;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.2s;
  background: none;
  border: none;
  padding: 0;
  width: 20px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signup-side .input-wrapper .toggle-password {
  top: 30px;
}

.input-wrapper .toggle-password:hover {
  opacity: 0.7;
}

.input-wrapper .toggle-password svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* === Forgot Password === */
.forgot-password-link {
  text-align: right;
  margin: 8px 0 0;
}

.forgot-password-link a {
  color: #60a5fa;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s;
}

.forgot-password-link a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

/* === Buttons === */
.client-login-ctn button,
.client-login-ctn .f1inal-login,
.client-login-ctn .submit-client-add,
.client-login-ctn #aGuestAcc {
  background: linear-gradient(180deg, #354052 0%, #111a2b 100%);

  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  height: 40px;
  width: 40px !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.1s ease;
  margin-top: -5px !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  letter-spacing: 0.3px;
}

.forgot-side {
  padding: 24px 28px 28px !important;
}

#client-rem button.close-btn {
  border-radius: 50% !important;
  height: 30px;
  width: 30px !important;
  font-size: 16px !important;
  font-weight: 500 !important;
}

#client-rem button.close-btn:has(.fa-arrow-left) {
  left: 10px;
}

#client-rem button.f1inal-login,
#client-rem button#aGuestAcc,
#client-rem button.submit-client-add {
  width: 100% !important;
  margin-top: 5px !important;
}

.client-login-ctn button:hover,
.client-login-ctn .f1inal-login:hover,
.client-login-ctn .submit-client-add:hover,
.client-login-ctn #aGuestAcc:hover {
  background: linear-gradient(180deg, #111a2b 0%, #354052 100%);
}

.client-login-ctn.dark button,
.client-login-ctn.dark .input-wrapper .toggle-password,
.client-login-ctn.dark .f1inal-login,
.client-login-ctn.dark .submit-client-add,
.client-login-ctn.dark #aGuestAcc {
  background: linear-gradient(180deg, #eaeaea 0%, #bababa 100%) !important;
  color: #000 !important;
}

.client-login-ctn.dark button:hover,
.client-login-ctn.dark .f1inal-login:hover,
.client-login-ctn.dark .submit-client-add:hover,
.client-login-ctn.dark #aGuestAcc:hover {
  background: linear-gradient(180deg, #bababa 0%, #eaeaea 100%) !important;
}

#client-rem button:active,
.client-login-ctn .f1inal-login:active,
.client-login-ctn .submit-client-add:active {
  transform: scale(0.99);
}

.f1inal-login {
  margin-top: 22px !important;
}

/* === Bottom Links === */
.bottom-link {
  text-align: center;
  margin-top: 20px;
  padding-bottom: 4px;
  font-size: 13px;
}

.bottom-link a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
}

.bottom-link a:hover {
  text-decoration: underline;
  color: #93c5fd;
}

/* === Terms Checkbox === */
.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0 4px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.terms-checkbox input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  margin: 0 !important;
  accent-color: #3b82f6;
  cursor: pointer;
  background: #1a2544 !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 3px !important;
}

.terms-checkbox a {
  color: #60a5fa;
  text-decoration: none;
}

.terms-checkbox a:hover {
  text-decoration: underline;
}

/* === Two column layout for sign up === */
.signup-side .two.fields,
.signup-side .three.fields {
  display: flex;
  gap: 12px;
  margin-bottom: 0;
}

.signup-side .two.fields .field,
.signup-side .three.fields .field {
  flex: 1;
  margin-bottom: 14px;
}

.signup-side .field {
  margin-bottom: 14px;
}

.temp-side>div .field label {
  color: black !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  margin-bottom: 6px !important;
  display: block;
}

/* === Section Titles (Shipping etc.) === */
.signup-side p {
  color: black !important;
  font-size: 14px;
  font-weight: 500;
  margin: 16px 0 8px;
}

.signup-side hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 8px 0 16px;
}

/* === Error Boxes (email validation) === */
div.email-wrapper .error-box,
div.email-wrapper-2 .error-box {
  color: #fca5a5;
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  font-size: 12px;
  padding: 8px 12px;
  position: relative;
  display: none;
  width: auto;
  height: auto;
  background-image: none;
  margin-top: 6px;
  text-align: center;
}

/* === Authorization Key (after signup) === */
.Added-tab {
  background-color: #101828 !important;
  padding: 24px 28px !important;
  border-radius: 0 0 16px 16px;
  text-align: center;
}

.Added-tab h3 {
  color: #4ade80 !important;
  font-size: 14px !important;
}

.Added-tab input.authorization-key {
  margin-top: 16px;
}

/* === Fieldset override === */
.client-login-ctn fieldset {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  width: 100%;
}

/* === Login form inputs wrapper === */
.logininputs {
  width: 100% !important;
  margin: 0 !important;
  text-align: left;
}

/* === Remodal background override === */
.client-modal.remodal-bg {
  background: transparent;
}

/* === Cart heading override === */
.CartHeading {
  display: none;
}

.CartTableWrapperFuture {
  background-color: transparent !important;
}

/* === Button container === */
.btn-ctn {
  margin-top: 8px !important;
}

/* === Scrollbar styling === */
body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: #f1f1f1;
}

body::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

body::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Dark theme scrollbar */
body:has(.client-login-ctn.dark)::-webkit-scrollbar-track {
  background: #0a0f1a;
}

body:has(.client-login-ctn.dark)::-webkit-scrollbar-thumb {
  background: #2a3544;
}

body:has(.client-login-ctn.dark)::-webkit-scrollbar-thumb:hover {
  background: #3a4554;
}

.temp-side::-webkit-scrollbar {
  width: 6px;
}

.temp-side::-webkit-scrollbar-track {
  background: transparent;
}

.temp-side::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

/* === Responsive === */
@media (max-width: 480px) {
  .remodal {
    max-width: 100% !important;
    border-radius: 0;
  }

  .client-login-ctn {
    border-radius: 0;
    max-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  .login-side>form,
  .signup-side .add-client-input-post>div {
    padding: 20px 16px 24px !important;
  }

  .signup-side .two.fields,
  .signup-side .three.fields {
    flex-direction: column;
    gap: 0;
  }

  .login-header {
    padding: 24px 16px 16px;
  }
}