/* FM Auth — login / register Agata-like */

.fm-auth {
  display: grid;
  grid-template-columns: minmax(320px, 480px) 1fr;
  gap: 0;
  min-height: calc(100vh - 220px);
  max-width: 1400px;
  margin: 0 auto 48px;
  background: #fff;
}

.fm-auth__form-col {
  padding: 40px 36px 56px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.fm-auth__card {
  width: 100%;
  max-width: 420px;
}

.fm-auth__title {
  margin: 0 0 24px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

.fm-auth__form .form-row,
.fm-auth__form .woocommerce-form-row {
  margin: 0 0 14px;
}

.fm-auth__form label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}

.fm-auth__form input[type="text"],
.fm-auth__form input[type="email"],
.fm-auth__form input[type="password"],
.fm-auth__form input[type="tel"] {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  font-size: 15px;
  background: #fff;
}

.fm-auth__form input:focus {
  outline: 2px solid #d62828;
  outline-offset: 1px;
  border-color: #d62828;
}

/* Flex wrap — unikamy absolute (WoodMart button{display:inline-flex} psuł oko) */
.fm-auth__pass-wrap {
  position: relative;
  display: flex !important;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  height: 46px;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  overflow: hidden;
}

.fm-auth__pass-wrap:focus-within {
  outline: 2px solid #d62828;
  outline-offset: 1px;
  border-color: #d62828;
}

.fm-auth__pass-wrap input,
.fm-auth__pass-wrap input.woocommerce-Input,
.fm-auth__pass-wrap input.input-text {
  flex: 1 1 auto !important;
  width: auto !important;
  min-width: 0 !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  outline: none !important;
  box-sizing: border-box;
}

.fm-auth__pass-wrap input:focus {
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.fm-auth__eye {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  flex: 0 0 40px !important;
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: auto !important;
  align-self: stretch !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #777 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  opacity: 1;
  z-index: 2;
  float: none !important;
}
.fm-auth__eye:hover,
.fm-auth__eye:focus {
  color: #111 !important;
  background: transparent !important;
  background-color: transparent !important;
  outline: none !important;
}
.fm-auth__eye svg {
  display: block;
  pointer-events: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.fm-auth__eye.is-revealed {
  color: var(--fm-red, #d62828) !important;
}

/* Solo forms (lost/reset password) — centered card, no split visual */
.fm-auth--solo {
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 280px);
  max-width: 560px;
  margin: 24px auto 64px;
  background: transparent;
}
.fm-auth--solo .fm-auth__form-col {
  width: 100%;
  padding: 24px 16px 48px;
  justify-content: center;
}
.fm-auth--solo .fm-auth__card {
  max-width: 440px;
  margin: 0 auto;
  padding: 28px 28px 32px;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,.04);
}
.fm-auth__lead {
  margin: -8px 0 22px;
  font-size: 14px;
  line-height: 1.45;
  color: #555;
}

/* Generic Woo account endpoints that still use default markup */
body.fm-auth-page--woo .woocommerce-MyAccount-content,
body.woocommerce-lost-password .woocommerce,
body.woocommerce-reset-password .woocommerce {
  max-width: 560px;
  margin: 24px auto 64px;
}
body.fm-auth-page--woo .woocommerce-MyAccount-navigation {
  display: none;
}

.fm-auth__hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #777;
}

.fm-auth__row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 18px;
  font-size: 13px;
}

.fm-auth__forgot {
  color: #333;
  text-decoration: underline;
}

.fm-auth__submit,
.fm-auth__form .woocommerce-form-login__submit {
  display: block;
  width: 100%;
  height: 52px;
  margin: 8px 0 0;
  border: 0;
  border-radius: 4px;
  background: #1a3a3a;
  color: #fff !important;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  line-height: 52px;
  padding: 0;
}

.fm-auth__submit:hover,
.fm-auth__form .woocommerce-form-login__submit:hover {
  background: #d62828;
  color: #fff !important;
}

.fm-auth__switch {
  margin: 20px 0 0;
  text-align: center;
  font-size: 14px;
}

.fm-auth__switch a {
  font-weight: 700;
  text-decoration: underline;
  color: #1a1a1a;
}

.fm-auth__help {
  margin: 12px 0 0;
  text-align: center;
  font-size: 13px;
}

.fm-auth__help a {
  color: #555;
  text-decoration: underline;
}

.fm-auth__visual {
  position: relative;
  min-height: 520px;
  background: #f3f1ec;
  overflow: hidden;
}

.fm-auth__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: absolute;
  inset: 0;
}

.fm-auth__social {
  margin: 0 0 16px;
}

.fm-auth__google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  border: 1px solid #dadce0;
  border-radius: 4px;
  background: #fff;
  color: #3c4043;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.fm-auth__google:hover:not(:disabled) {
  background: #f8f9fa;
  color: #1a1a1a;
}

.fm-auth__google:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.fm-auth__google-ico {
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.fm-auth__social-hint {
  margin: 8px 0 0;
  font-size: 12px;
  color: #888;
  text-align: center;
}

.fm-auth__or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: #999;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.fm-auth__or::before,
.fm-auth__or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}

.fm-auth__type {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
  font-size: 14px;
}

.fm-auth__type label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fm-auth__grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fm-auth__grid-addr {
  display: grid;
  grid-template-columns: 1.6fr .7fr .7fr;
  gap: 12px;
}

.fm-auth__company[hidden] {
  display: none !important;
}

/* Account hover drop */
.fm-drop--account {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 60;
  min-width: 220px;
  padding: 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
}

.fm-drop--account[hidden] {
  display: none !important;
}

.fm-account-drop__btn {
  display: block;
  width: 100%;
  height: 44px;
  border-radius: 4px;
  background: #1a3a3a;
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  line-height: 44px;
  text-decoration: none !important;
}

.fm-account-drop__btn:hover {
  background: #d62828;
  color: #fff !important;
}

.fm-account-drop__ask {
  margin: 14px 0 4px;
  font-size: 13px;
  color: #333;
  text-align: center;
}

.fm-account-drop__hello {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

.fm-account-drop__link {
  display: block;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: underline;
}

.fm-hdr__tool-wrap--account {
  position: relative;
  z-index: 1;
}

.fm-hdr__tool-wrap--account.is-open {
  z-index: 55;
}

.fm-hdr__tool-wrap--account.is-open > .fm-hdr__tool {
  color: var(--fm-red);
}

@media (max-width: 900px) {
  .fm-auth {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-bottom: 24px;
  }
  .fm-auth--solo {
    min-height: 0;
    margin: 12px auto 40px;
  }
  .fm-auth--solo .fm-auth__card {
    padding: 20px 16px 24px;
  }
  .fm-auth__form-col {
    padding: 24px 16px 40px;
  }
  .fm-auth__title {
    font-size: 26px;
    margin-bottom: 18px;
  }
  .fm-auth__visual {
    min-height: 200px;
    max-height: 240px;
    order: -1;
  }
  .fm-auth__grid-2,
  .fm-auth__grid-addr {
    grid-template-columns: 1fr;
  }
}
