@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Vazirmatn';
  src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #173640;
  --muted: #28464f;
  --muted-light: #8a9aa0;
  --line: rgba(15, 41, 49, 0.08);
  --primary: #46c8dd;
  --primary-hover: #35bcd3;
  --ocean-soft: #eef8fd;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', sans-serif;
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  overflow: visible;
  background: var(--bg);
}

.auth-header {
  position: sticky;
  top: 0;
  z-index: 100;

  width: 100%;
  height: auto;

min-height:
  calc(
    58px +
    env(safe-area-inset-top)
  );

padding:
  env(safe-area-inset-top)
  max(
    14px,
    env(safe-area-inset-right)
  )
  0
  max(
    14px,
    env(safe-area-inset-left)
  );

  display: flex;
  align-items: center;
  gap: 10px;

  border-bottom: 1px solid var(--line);
  background: var(--card);
}

.auth-back-form {
  margin: 0;
  padding: 0;
}

.auth-back-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
}

.auth-back-btn span {
  width: 10px;
  height: 10px;

  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;

  transform: rotate(45deg);
}

.auth-header-title {
  flex: 1;
  margin: 0;

  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}

.auth-content {
  width: 100%;
  padding: 20px 22px 34px;
}

.auth-image {
  width: 100%;
  margin-bottom: 20px;

  display: flex;
  justify-content: center;
}

.auth-image img {
  display: block;

  width: 50%;
  max-width: 260px;
  height: auto;
}

.auth-form {
  width: 100%;
}

.form-group {
  margin-bottom: 10px;
}

.form-label {
  display: block;

  margin-bottom: 8px;

  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.8;
}

.form-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;

  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;

  background: var(--card);
  color: var(--text);

  font-size: 16px;
  font-weight: 400;

  direction: ltr;
  text-align: left;

  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
}

.form-input:focus {
  border-color: rgba(70, 200, 221, 0.65);
  outline: none;
  box-shadow: 0 0 0 3px rgba(70, 200, 221, 0.08);
}

.form-input::placeholder {
  color: #a8bbc0;
  font-weight: 400;
}

.auth-submit {
  position: relative;

  width: 100%;
  height: 52px;
  overflow: hidden;

  border: 1px solid var(--primary);
  border-radius: 12px;

  background: var(--primary);
  color: #ffffff;

  font-size: 16px;
  font-weight: 500;

  box-shadow: none;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

.auth-submit:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.auth-submit:active:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
}

.auth-submit:focus,
.auth-submit:focus-visible {
  outline: none;
  box-shadow: none;
}

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.auth-submit.is-loading {
  opacity: 1;
  cursor: wait;
  pointer-events: none;
}

.auth-submit-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-submit-loading {
  position: absolute;
  inset: 0;

  display: none;
  align-items: center;
  justify-content: center;
  gap: 5px;

  border-radius: inherit;
  background: var(--primary);

  pointer-events: none;
}

.auth-submit.is-loading .auth-submit-text {
  visibility: hidden;
}

.auth-submit.is-loading .auth-submit-loading {
  display: flex;
}

.auth-submit-loading i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;

  border-radius: 50%;
  background: #ffffff;

  animation: auth-dot 0.9s infinite ease-in-out;
}

.auth-submit-loading i:nth-child(2) {
  animation-delay: 0.15s;
}

.auth-submit-loading i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes auth-dot {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.35;
  }

  40% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

.otp-heading {
  margin: 0 0 6px;

  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;

  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.9;
  text-align: right;
}

.otp-mobile-number {
  display: inline-block;

  direction: ltr;
  unicode-bidi: isolate;

  color: var(--text);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.otp-spam-note {
  margin: 0 0 10px;

  color: var(--muted-light);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.8;
  text-align: right;
}

.otp-form-group {
  margin-bottom: 10px;
}

.otp-input {
  height: 52px;
  padding: 0 18px;

  direction: ltr;
  text-align: center;

  font-size: 21px;
  font-weight: 500;
  letter-spacing: 12px;
}

.otp-actions {
  width: 100%;
  min-height: 38px;
  margin-top: 10px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  white-space: nowrap;
}

.otp-action-form {
  margin: 0;
  padding: 0;

  display: inline-flex;
  align-items: center;
}

.otp-action-button {
  min-height: 34px;
  margin: 0;
  padding: 5px 7px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 0;
  border-radius: 8px;

  background: transparent;
  color: var(--primary-hover);

  font-size: 12.5px;
  font-weight: 500;
  line-height: 24px;

  white-space: nowrap;
}

.otp-action-button:hover:not(:disabled) {
  background: var(--ocean-soft);
}

.otp-action-button:disabled {
  background: transparent;
  color: #8da4ab;

  opacity: 1;
  cursor: not-allowed;
}

.cart-message-box {
  position: fixed;
  right: 16px;
  left: 16px;
  bottom:
  calc(
    24px +
    env(safe-area-inset-bottom)
  );
  z-index: 999999;

  max-width: 440px;
  min-height: 48px;
  margin: 0 auto;
  padding: 12px 14px;

  display: flex;
  align-items: center;

  border: 1px solid #e6eaed;
  border-radius: 12px;

  background: #ffffff;
  color: var(--text);

  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
  text-align: right;
  direction: rtl;

  box-shadow: 0 8px 28px rgba(15, 41, 49, 0.12);

  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s ease;

  pointer-events: none;
}

.cart-message-box.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.cart-message-box.is-error {
  border-color: #ffd4d4;
  background: #fff7f7;
  color: #c93838;
}

.cart-message-box.is-success {
  border-color: #cdeee5;
  background: #f4fffb;
  color: #16835f;
}

/* =========================================================
   AUTH RESPONSIVE
========================================================= */

@media (max-width: 359px) {

  .auth-header {
    padding-right: 10px;
    padding-left: 10px;
  }

  .auth-content {
    padding:
      16px
      14px
      28px;
  }

  .auth-image {
    margin-bottom: 16px;
  }

  .auth-image img {
    width: 46%;
  }

  .auth-header-title {
    font-size: 15px;
  }

  .form-label,
  .otp-heading {
    font-size: 11.5px;
  }

  .otp-input {
    padding-right: 10px;
    padding-left: 10px;

    font-size: 19px;
    letter-spacing: 9px;
  }

  .otp-actions {
    min-height: 0;

    flex-wrap: wrap;
    justify-content: center;
    gap: 5px 10px;

    white-space: normal;
  }

  .otp-action-button {
    font-size: 11.5px;
  }
}


/* =========================================================
   AUTH TABLET
========================================================= */

@media (
  min-width: 600px
) and (
  max-width: 899px
) {

  body {
    background: #f3fbfe;
  }

  .app {
    max-width: 560px;

    margin-top: 24px;
    margin-bottom: 24px;

    min-height:
      calc(
        100dvh -
        48px
      );

    overflow: hidden;

    border: 1px solid var(--line);
    border-radius: 20px;

    background: #ffffff;
  }

  .auth-header {
    position: relative;
  }

  .auth-content {
    min-height:
      calc(
        100dvh -
        130px
      );

    padding:
      34px
      48px
      42px;

    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .auth-image img {
    width: 44%;
    max-width: 230px;
  }
}


/* =========================================================
   AUTH DESKTOP
========================================================= */

@media (min-width: 900px) {

  body {
    min-height: 100dvh;

    padding:
      32px
      24px;

    background:
      linear-gradient(
        180deg,
        #f3fbfe 0%,
        #ffffff 100%
      );
  }

  .app {
    width: 100%;
    max-width: 560px;

    min-height:
      calc(
        100dvh -
        64px
      );

    margin:
      0
      auto;

    overflow: hidden;

    border: 1px solid var(--line);
    border-radius: 22px;

    background: #ffffff;

    box-shadow:
      0
      18px
      55px
      rgba(15, 41, 49, 0.08);
  }

  .auth-header {
    position: relative;

    min-height: 64px;

    padding-right: 22px;
    padding-left: 22px;
  }

  .auth-header-title {
    font-size: 18px;
  }

  .auth-content {
    min-height:
      calc(
        100dvh -
        130px
      );

    padding:
      42px
      58px
      52px;

    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .auth-image {
    margin-bottom: 26px;
  }

  .auth-image img {
    width: 42%;
    max-width: 240px;
  }

  .form-group {
    margin-bottom: 13px;
  }

  .form-label {
    font-size: 13px;
  }

  .form-input,
  .auth-submit {
    height: 54px;
  }

  .otp-actions {
    margin-top: 14px;
  }

  .cart-message-box {
    bottom: 32px;
  }
}


/* =========================================================
   AUTH DESKTOP HOVER
========================================================= */

@media (
  min-width: 900px
) and (
  hover: hover
) and (
  pointer: fine
) {

  .auth-back-btn,
  .otp-action-button {
    transition:
      background-color 0.18s ease,
      color 0.18s ease;
  }

  .auth-back-btn:hover,
  .otp-action-button:hover:not(:disabled) {
    background: var(--ocean-soft);
  }

  .auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
  }
}