/* ==========================================
   Modern authentication flow
   Reusable in login page, checkout and comments
   ========================================== */

:root {
  --auth-accent: #ef394e;
  --auth-accent-dark: #c91d3c;
  --auth-accent-soft: #fff1f3;
  --auth-text: #1f2937;
  --auth-muted: #64748b;
  --auth-border: #e8edf3;
  --auth-soft: #f8fafc;
  --auth-surface: #ffffff;
}

.modern-auth-page {
  position: relative;
  min-height: calc(100vh - 180px);
  overflow: hidden;
  padding: 42px 14px 64px;
  direction: rtl;
  background:
    radial-gradient(circle at 12% 18%, rgba(239, 57, 78, .075), transparent 26%),
    radial-gradient(circle at 88% 82%, rgba(239, 57, 78, .055), transparent 24%),
    #f8fafc;
}

.modern-auth-page::before,
.modern-auth-page::after {
  position: absolute;
  content: "";
  pointer-events: none;
  border-radius: 50%;
}

.modern-auth-page::before {
  width: 210px;
  height: 210px;
  top: -95px;
  right: -80px;
  background: rgba(239, 57, 78, .055);
}

.modern-auth-page::after {
  width: 170px;
  height: 170px;
  bottom: -80px;
  left: -60px;
  background: rgba(239, 57, 78, .04);
}

.modern-auth-page .auth-page-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  margin: 0 auto;
}

.auth-card {
  position: relative;
  overflow: hidden;
  padding: 24px 23px 20px;
  direction: rtl;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, .075);
}

.auth-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  content: "";
  background: linear-gradient(90deg, var(--auth-accent-dark), var(--auth-accent), #ff6b7b);
}

.auth-card__header {
  margin-bottom: 13px;
  text-align: center;
}

.auth-card__icon,
.auth-flow__icon {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 11px;
  color: var(--auth-accent);
  font-size: 23px;
  background: var(--auth-accent-soft);
  border: 1px solid #ffe0e5;
  border-radius: 18px;
}

.auth-card__title {
  margin: 0;
  color: var(--auth-text);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.8;
}

.auth-card__subtitle {
  margin: 4px 0 0;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 2;
}

.auth-card__secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.8;
}

.auth-card__secure-note i {
  color: #16a34a;
}

/* The reusable partial and every AJAX step live inside #div_1 */
.auth-flow {
  direction: rtl;
}

.auth-flow > .row,
.auth-flow .auth-flow-step {
  margin-right: -7px;
  margin-left: -7px;
}

.auth-flow > .row > [class*="col-"],
.auth-flow .auth-flow-step > [class*="col-"] {
  padding-right: 7px;
  padding-left: 7px;
}

.auth-flow__heading,
.auth-flow > .row > .col-md-12:first-child {
  margin-bottom: 13px !important;
  text-align: center;
}

.auth-flow__heading h1,
.auth-flow > .row > .col-md-12:first-child h1 {
  margin: 0 !important;
  color: var(--auth-text);
  font-size: 17px !important;
  font-weight: 800 !important;
  line-height: 1.9;
}

.auth-flow__heading p,
.auth-flow__heading span,
.auth-flow > .row > .col-md-12:first-child > span {
  display: block;
  margin: 4px 0 0;
  color: var(--auth-muted) !important;
  font-size: 12px;
  line-height: 2;
}

.auth-flow__label {
  display: block;
  margin: 0 0 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.auth-flow .md-formc2 {
  position: relative;
  margin: 0 0 11px !important;
}

.auth-flow .auth-input-wrap {
  position: relative;
}

.auth-flow .auth-input-wrap > i {
  position: absolute;
  top: 50%;
  right: 13px;
  z-index: 2;
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
  transform: translateY(-50%);
}

.auth-flow .form-control {
  width: 100%;
  height: 46px !important;
  padding: 8px 13px !important;
  color: var(--auth-text) !important;
  font-size: 13px !important;
  line-height: 28px !important;
  background: #fff !important;
  border: 1px solid #e4e9ef !important;
  border-radius: 11px !important;
  outline: 0 !important;
  box-shadow: none !important;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-flow .auth-input-wrap .form-control {
  padding-right: 41px !important;
}

.auth-flow .form-control:focus {
  background: #fff !important;
  border-color: rgba(239, 57, 78, .62) !important;
  box-shadow: 0 0 0 4px rgba(239, 57, 78, .085) !important;
}

.auth-flow .form-control[readonly] {
  color: #64748b !important;
  background: #f8fafc !important;
}

.auth-flow .auth-code-input,
.auth-flow #code_verify {
  direction: ltr;
  font-size: 18px !important;
  font-weight: 800;
  letter-spacing: 7px;
  text-align: center;
}

.auth-flow__hint {
  display: block;
  margin: -3px 0 11px;
  color: #94a3b8;
  font-size: 10px;
  line-height: 1.9;
}

.auth-primary-button,
.auth-flow .btn-block,
.auth-flow .botmy {
  display: inline-flex !important;
  width: 100%;
  min-height: 45px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 1px 0 0 !important;
  padding: 9px 14px !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.8 !important;
  cursor: pointer;
  background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-dark)) !important;
  border: 0 !important;
  border-radius: 11px !important;
  box-shadow: 0 10px 22px rgba(217, 38, 71, .17) !important;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.auth-primary-button:hover,
.auth-flow .btn-block:hover,
.auth-flow .botmy:hover {
  color: #fff !important;
  filter: brightness(.98);
  box-shadow: 0 13px 25px rgba(217, 38, 71, .23) !important;
  transform: translateY(-1px);
}

.auth-primary-button:disabled,
.auth-flow .btn-block:disabled,
.auth-flow .botmy:disabled {
  cursor: wait;
  opacity: .68;
  transform: none;
}

.auth-flow__note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 9px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.9;
  background: #f8fafc;
  border-radius: 9px;
}

.auth-flow__note i {
  margin-top: 3px;
  color: #16a34a;
}

.auth-flow #res_alert,
.auth-status-messages,
#authPageAlert {
  margin-bottom: 7px;
}

.auth-flow .alert,
.auth-status-messages .alert,
#authPageAlert .alert {
  margin: 0 0 9px !important;
  padding: 9px 10px !important;
  font-size: 11px !important;
  line-height: 1.95;
  border: 0 !important;
  border-radius: 9px !important;
}

.auth-flow .alert-success,
.auth-status-messages .alert-success {
  color: #166534;
  background: #f0fdf4;
}

.auth-flow .alert-warning,
.auth-status-messages .alert-warning {
  color: #92400e;
  background: #fffbeb;
}

.auth-flow .alert-danger,
.auth-status-messages .alert-danger {
  color: #b91c1c;
  background: #fef2f2;
}

.auth-flow #showline {
  min-height: 19px;
  margin: 2px 0 6px;
  color: var(--auth-accent-dark);
  font-size: 12px;
  font-weight: 800;
  text-align: center !important;
}

.auth-flow [id="btnagain"],
.auth-flow .auth-flow-secondary-action {
  display: inline-flex;
  width: 49%;
  justify-content: center;
  padding: 3px 2px 8px;
}

.auth-flow [id="btnagain"] a,
.auth-flow .auth-flow-secondary-action a {
  float: none !important;
  margin: 0 !important;
  color: #64748b !important;
  font-size: 11px;
  cursor: pointer;
  text-decoration: none !important;
}

.auth-flow [id="btnagain"] a:hover,
.auth-flow .auth-flow-secondary-action a:hover {
  color: var(--auth-accent) !important;
}

.auth-flow-loader {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(2px);
}

.auth-flow-loader__spinner {
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  color: var(--auth-accent);
  font-size: 30px;
  background: #fff;
  border: 1px solid #ffe0e5;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .09);
}

@media (max-width: 575px) {
  .modern-auth-page {
    min-height: calc(100vh - 132px);
    padding: 18px 9px 84px;
  }

  .auth-card {
    padding: 19px 14px 16px;
    border-radius: 15px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .065);
  }

  .auth-card__icon,
  .auth-flow__icon {
    width: 50px;
    height: 50px;
    margin-bottom: 8px;
    font-size: 20px;
    border-radius: 15px;
  }

  .auth-card__title {
    font-size: 17px;
  }

  .auth-card__subtitle,
  .auth-flow__heading p,
  .auth-flow__heading span {
    font-size: 11px;
  }

  .auth-flow .form-control {
    height: 44px !important;
  }

  .auth-primary-button,
  .auth-flow .btn-block,
  .auth-flow .botmy {
    min-height: 44px;
  }
}
