@font-face {
  font-family: 'єКупа Google Sans';
  src: url('google-sans-500-button.woff2') format('woff2');
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

.ekupa-auth-dialog {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #18221c;
  box-shadow: 0 16px 44px rgb(10 28 17 / 20%);
  font: 400 15px / 1.45 'єКупа Manrope', system-ui, sans-serif;
}

.ekupa-auth-dialog::backdrop {
  background: rgb(0 0 0 / 50%);
}

.ekupa-auth-dialog--profile::backdrop {
  background: rgb(240 246 242 / 58%);
  backdrop-filter: blur(3px);
}

html:has(.ekupa-auth-dialog[open]) {
  overflow: hidden;
}

.ekupa-auth-dialog [hidden] {
  display: none;
}

.ekupa-auth-dialog__header {
  min-height: 64px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid #e7eae7;
}

.ekupa-auth-dialog__header h2 {
  margin: 0;
  font: 700 24px / 1.2 'єКупа Onest', 'єКупа Manrope', system-ui, sans-serif;
}

.ekupa-auth-dialog :where(button, input) {
  box-sizing: border-box;
  font: inherit;
}

.ekupa-auth-dialog button {
  cursor: pointer;
}

.ekupa-auth-dialog button:disabled {
  cursor: default;
}

.ekupa-auth-dialog button:focus-visible,
.ekupa-auth-dialog input:focus-visible {
  outline: 2px solid #167947;
  outline-offset: 2px;
}

.ekupa-auth-dialog__close {
  position: relative;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #58645d;
}

.ekupa-auth-dialog__close:hover {
  background: #f1f4f2;
}

.ekupa-auth-dialog__close::before,
.ekupa-auth-dialog__close::after {
  position: absolute;
  content: '';
  inset: 19px 12px auto;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transform: rotate(45deg);
}

.ekupa-auth-dialog__close::after {
  transform: rotate(-45deg);
}

.ekupa-auth-dialog__body {
  padding: 16px 20px 22px;
}

.ekupa-auth-dialog__form {
  display: grid;
  gap: 8px;
  margin: 0;
}

.ekupa-auth-dialog__form label {
  font-size: 13px;
  font-weight: 600;
}

.ekupa-auth-dialog__form input {
  width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #cbd2ce;
  border-radius: 7px;
  background: #fff;
  color: #18221c;
  font-size: 16px;
}

.ekupa-auth-dialog #ekupa-auth-code {
  letter-spacing: 0.25em;
  font-variant-numeric: tabular-nums;
}

.ekupa-auth-dialog--profile .ekupa-auth-dialog__header h2 {
  font-size: clamp(20px, 5.5vw, 24px);
}

.ekupa-auth-dialog--profile .ekupa-auth-dialog__form input {
  background: transparent;
}

.ekupa-auth-dialog--profile label:not(:first-child) {
  margin-top: 5px;
}

.ekupa-auth-dialog__phone {
  display: flex;
  align-items: center;
  border: 1px solid #cbd2ce;
  border-radius: 7px;
  padding-left: 11px;
  font-size: 16px;
}

.ekupa-auth-dialog__phone:focus-within {
  outline: 2px solid #167947;
  outline-offset: 2px;
}

.ekupa-auth-dialog--profile .ekupa-auth-dialog__phone input {
  min-width: 0;
  min-height: 42px;
  border: 0;
  padding-left: 8px;
  outline: 0;
}

.ekupa-auth-dialog__primary,
.ekupa-auth-dialog__google {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: center;
}

.ekupa-auth-dialog__primary {
  margin-top: 7px;
  background: #167947;
  color: #fff;
  font-weight: 700;
}

.ekupa-auth-dialog__primary:hover:not(:disabled) {
  background: #11653a;
}

.ekupa-auth-dialog__primary:disabled {
  opacity: 0.62;
}

.ekupa-auth-dialog__note {
  margin: 12px 0 0;
  color: #505d56;
  font-size: 13px;
  text-align: center;
}

.ekupa-auth-dialog__divider {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 17px 0 13px;
  color: #56635c;
  font-size: 13px;
}

.ekupa-auth-dialog__divider::before,
.ekupa-auth-dialog__divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid #e1e7e3;
}

.ekupa-auth-dialog__google {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border-color: #747775;
  background: #fff;
  color: #1f1f1f;
  font: 500 14px / 20px 'єКупа Google Sans', Arial, sans-serif;
}

.ekupa-auth-dialog__google img {
  flex: none;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.ekupa-auth-dialog__google:hover:not(:disabled) {
  background: #f6f9fe;
}

.ekupa-auth-dialog__google:disabled {
  opacity: 0.65;
}

.ekupa-auth-dialog__provider {
  font-size: 12px;
}

.ekupa-auth-dialog__status {
  margin: 0 0 14px;
  padding: 9px 11px;
  border-radius: 6px;
  background: #edf5ef;
  color: #244d34;
  overflow-wrap: anywhere;
}

.ekupa-auth-dialog__status[data-error] {
  background: #fdf0ee;
  color: #873229;
}

.ekupa-auth-dialog__sent {
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}

.ekupa-auth-dialog__links {
  display: grid;
  justify-items: center;
  gap: 3px;
  margin-top: 10px;
}

.ekupa-auth-dialog__links button {
  min-height: 39px;
  padding: 4px 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #14663d;
  font-size: 14px;
}

.ekupa-auth-dialog__links button:hover:not(:disabled) {
  text-decoration: underline;
}

.ekupa-auth-dialog__links button:disabled {
  color: #65716a;
}
