.tavazo-auth-modal {
  position: fixed;
  z-index: 2147483647 !important;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition:
    visibility 0s linear 0.34s,
    opacity 0.3s cubic-bezier(0.36, 0.66, 0.04, 1);
}

.tavazo-auth-modal[hidden] {
  display: none;
}

.tavazo-auth-modal.is-mounted {
  visibility: visible;
  transition-delay: 0s;
}

.tavazo-auth-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.tavazo-auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  opacity: 0;
  backdrop-filter: blur(1.5px);
  transition: opacity 0.3s cubic-bezier(0.36, 0.66, 0.04, 1);
}

.tavazo-auth-modal.is-open .tavazo-auth-modal__backdrop {
  opacity: 1;
}

.tavazo-auth-modal__dialog {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  inline-size: min(463px, 100%);
  max-block-size: calc(100dvh - 32px);
  overflow: auto;
  padding: 40px 32px 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.12);
  direction: rtl;
  outline: none;
  opacity: 0;
  transform: translateY(28px) scale(0.965);
  transform-origin: center;
  transition:
    opacity 0.24s ease,
    transform 0.34s cubic-bezier(0.36, 0.66, 0.04, 1),
    inline-size 0.28s cubic-bezier(0.36, 0.66, 0.04, 1),
    min-block-size 0.28s cubic-bezier(0.36, 0.66, 0.04, 1);
}

.tavazo-auth-modal.is-open .tavazo-auth-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tavazo-auth-modal__dialog.is-loading {
  display: flex;
  inline-size: 132px;
  min-block-size: 132px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 24px;
  border-radius: 28px;
}

.tavazo-auth-modal__loader,
.tavazo-auth-modal__load-error {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.tavazo-auth-modal__spinner {
  display: block;
  inline-size: 36px;
  block-size: 36px;
  border: 3px solid #d8e1de;
  border-block-start-color: #0c3c30;
  border-radius: 50%;
  animation: tavazo-auth-modal-spin 0.75s linear infinite;
}

.tavazo-auth-modal__loading-text {
  color: #666;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.tavazo-auth-modal__load-error {
  min-block-size: 132px;
}

.tavazo-auth-modal__load-error p {
  margin: 0;
  color: #b42318;
  font-size: 13px;
  line-height: 1.6;
}

.tavazo-auth-modal__load-error button {
  min-block-size: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 9px;
  background: #0c3c30;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
}

.tavazo-auth-modal.is-content-ready .tavazo-auth-modal__views {
  animation: tavazo-auth-modal-content-in 0.32s cubic-bezier(0.36, 0.66, 0.04, 1) both;
}

.tavazo-auth-modal__close {
  position: absolute;
  inset-block-start: 24px;
  inset-inline-start: 24px;
  display: inline-flex;
  inline-size: 36px;
  block-size: 36px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ebebeb;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.24s cubic-bezier(0.36, 0.66, 0.04, 1);
}

.tavazo-auth-modal__close:hover,
.tavazo-auth-modal__close:focus-visible {
  background: #dedede;
  transform: rotate(6deg) scale(1.06);
}

.tavazo-auth-modal__close img {
  display: block;
  inline-size: 11px;
  block-size: 11px;
}

.tavazo-auth-modal__header {
  margin-block-end: 32px;
  padding-inline: 20px;
  text-align: center;
}

.tavazo-auth-modal__header h2 {
  margin: 0 0 8px;
  color: #292929;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
}

.tavazo-auth-modal__header p {
  margin: 0;
  color: #8f8f8f;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.tavazo-auth-modal__view {
  display: none;
}

.tavazo-auth-modal__view.is-active {
  display: block;
  animation: tavazo-auth-modal-view-in 0.26s ease both;
}

.tavazo-auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tavazo-auth-form .woocommerce-form-row {
  position: relative;
  margin: 0;
}

.tavazo-auth-form .woocommerce-form-row input {
  box-sizing: border-box;
  inline-size: 100%;
  block-size: 56px;
  padding: 16px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  color: #292929;
}

.tavazo-auth-form .woocommerce-form-row input:focus {
  border: 1.5px solid #367aff;
  outline: 0;
}

.tavazo-auth-form .woocommerce-form-row label {
  position: absolute;
  z-index: 1;
  inset-block-start: -11px;
  inset-inline-start: 14px;
  padding-inline: 4px;
  background: #fff;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  line-height: 21px;
}

.tavazo-auth-form .woocommerce-form-row input:focus + label {
  color: #367aff;
}

.tavazo-auth-form__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  color: #666;
  font-size: 12px;
}

.tavazo-auth-form__meta label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.tavazo-auth-form__meta a {
  color: #666;
  text-decoration: underline;
}

.tavazo-auth-form > .woocommerce-button {
  display: inline-flex;
  inline-size: 100%;
  min-block-size: 48px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: #0c3c30;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tavazo-auth-form > .woocommerce-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.tavazo-auth-modal .tavazo-cwgoogle {
  margin: 0 !important;
}

.tavazo-auth-modal .tavazo-cwgoogle .separator {
  margin: 0 0 20px;
}

.tavazo-auth-modal .tavazo-cwgoogle a {
  min-block-size: 48px;
}

.tavazo-auth-form__switch {
  margin: -4px 0 0;
  color: #666;
  font-size: 14px;
  text-align: center;
}

.tavazo-auth-form__switch button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #367aff;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.tavazo-auth-form__message {
  display: none;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff0f1;
  color: #b42318;
  font-size: 13px;
  line-height: 1.5;
}

.tavazo-auth-form__message.is-visible {
  display: block;
}

body.tavazo-auth-modal-open {
  overflow: hidden;
}

@keyframes tavazo-auth-modal-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes tavazo-auth-modal-content-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes tavazo-auth-modal-view-in {
  from {
    opacity: 0;
    transform: translateX(-8px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 600px) {
  .tavazo-auth-modal__dialog {
    inline-size: 100%;
  }

  .tavazo-auth-modal__close {
    inset-inline-start: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tavazo-auth-modal,
  .tavazo-auth-modal__backdrop,
  .tavazo-auth-modal__dialog,
  .tavazo-auth-modal__close {
    transition: none;
  }

  .tavazo-auth-modal__spinner,
  .tavazo-auth-modal.is-content-ready .tavazo-auth-modal__views,
  .tavazo-auth-modal__view.is-active {
    animation: none;
  }
}
