/* GRIM frontend stabilization layer */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

.password-rules {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 10px 0 14px;
  font-size: 13px;
  line-height: 1.4;
}

.auth-name-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.grim-phone-row {
  display: grid;
  grid-template-columns: minmax(112px, 145px) 1fr;
  gap: 10px;
  width: 100%;
}

.grim-phone-row select,
.grim-phone-row input {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.grim-google-btn {
  width: 100%;
  min-height: 52px;
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  background: #fff;
  color: #171017;
  border: 1px solid #c9c0b4;
  font: inherit;
  letter-spacing: .08em;
}

.grim-google-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 700;
  border: 1px solid #ddd;
}

#auth .box,
#checkout .checkout-box,
#helpModal .box,
#marketModal .box {
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#checkout .checkout-box {
  width: min(760px, 100%);
}

#auth input,
#auth select,
#checkout input,
#checkout select,
#checkout textarea {
  width: 100%;
}

#paymentStep [data-frontend-stage="true"] {
  opacity: .78;
}

@media (max-width: 800px) {
  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  input,
  select,
  textarea {
    touch-action: manipulation;
  }

  .auth-name-grid {
    grid-template-columns: 1fr;
  }

  .grim-phone-row {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  #auth,
  #checkout,
  #helpModal,
  #marketModal {
    padding: 12px;
  }

  #auth .box,
  #checkout .checkout-box,
  #helpModal .box,
  #marketModal .box {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 430px) {
  .grim-phone-row {
    grid-template-columns: 108px minmax(0, 1fr);
    gap: 8px;
  }

  .care-fab {
    max-width: calc(100vw - 28px);
  }
}
