@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --al-red:        #8B0000;
  --al-red-deep:   #6B0000;
  --al-red-hover:  #A00000;
  --al-gold:       #C9A96E;
  --al-white:      #FFFFFF;
  --al-off-white:  #FBF9F7;
  --al-text:       #1C1010;
  --al-muted:      #9A8080;
  --al-border:     #EAE0D8;
  --al-input-bg:   #FDFCFB;
  --al-shadow-sm:  0 2px 8px rgba(139,0,0,.08);
  --al-shadow-lg:  0 24px 64px rgba(100,0,0,.13), 0 4px 16px rgba(0,0,0,.05);
  --al-font-head:  'Playfair Display', Georgia, serif;
  --al-font-body:  'Inter', Helvetica, Arial, sans-serif;
  --al-radius-btn: 50px;
  --al-radius-inp: 12px;
  --al-radius-card:20px;
  --al-ease:       cubic-bezier(.4,0,.2,1);
}

/* ── Reset & base ─────────────────────────────────────────── */
.al-otp-wrap * { box-sizing: border-box; }

/* ── Full-page wrapper ────────────────────────────────────── */
.al-otp-wrap {
  min-height:      100vh;
  display:         flex;
  flex-direction:  column;
  align-items:     center;
  justify-content: center;
  padding:         32px 16px 48px;
  background:      var(--al-off-white);
  background-image:
    radial-gradient(ellipse 100% 60% at 50% -5%,  rgba(139,0,0,.07) 0%, transparent 55%),
    radial-gradient(ellipse 60%  80% at 100% 80%, rgba(201,169,110,.06) 0%, transparent 50%);
  font-family:     var(--al-font-body);
  animation:       al-page-in .4s var(--al-ease) both;
}
@keyframes al-page-in { from{opacity:0} to{opacity:1} }

/* ── Card ─────────────────────────────────────────────────── */
.al-otp-card {
  background:    var(--al-white);
  border-radius: var(--al-radius-card);
  box-shadow:    var(--al-shadow-lg);
  padding:       48px 44px 40px;
  width:         100%;
  max-width:     420px;
  position:      relative;
  overflow:      hidden;
  animation:     al-card-in .55s .05s var(--al-ease) both;
}
@keyframes al-card-in {
  from { opacity:0; transform:translateY(28px) scale(.97); }
  to   { opacity:1; transform:translateY(0)    scale(1); }
}

/* Top gradient strip */
.al-otp-card::before {
  content:  '';
  position: absolute;
  inset:    0 0 auto 0;
  height:   4px;
  background: linear-gradient(90deg,
    var(--al-red-deep) 0%,
    #C0392B 30%,
    var(--al-gold) 50%,
    #C0392B 70%,
    var(--al-red-deep) 100%);
  border-radius: var(--al-radius-card) var(--al-radius-card) 0 0;
}

/* Faint watermark ring */
.al-otp-card::after {
  content:       '';
  position:      absolute;
  bottom:        -60px;
  right:         -60px;
  width:         200px;
  height:        200px;
  border-radius: 50%;
  border:        1px solid rgba(139,0,0,.05);
  pointer-events:none;
}

/* ── Logo ─────────────────────────────────────────────────── */
.al-otp-logo {
  text-align:    center;
  margin-bottom: 28px;
  padding-bottom:28px;
  border-bottom: 1px solid var(--al-border);
}
.al-otp-logo img,
.al-otp-logo .custom-logo {
  max-width:  170px;
  max-height: 60px;
  width:      auto;
  height:     auto;
  display:    inline-block;
  object-fit: contain;
}
.al-otp-site-name {
  font-family:  var(--al-font-head);
  font-size:    24px;
  font-weight:  600;
  color:        var(--al-red);
  letter-spacing: .3px;
}

/* ── Heading & sub ────────────────────────────────────────── */
.al-otp-heading {
  font-family:  var(--al-font-head);
  font-size:    28px;
  font-weight:  600;
  color:        var(--al-text);
  margin:       0 0 6px;
  line-height:  1.2;
  letter-spacing:-.2px;
}
.al-otp-sub {
  font-size:    14px;
  color:        var(--al-muted);
  margin:       0 0 28px;
  font-weight:  400;
  line-height:  1.5;
}

/* ── Label ────────────────────────────────────────────────── */
.al-otp-label {
  display:        block;
  font-size:      11px;
  font-weight:    600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color:          var(--al-muted);
  margin-bottom:  7px;
}

/* ── Input ────────────────────────────────────────────────── */
.al-otp-input {
  display:       block;
  width:         100%;
  padding:       14px 18px;
  border:        1.5px solid var(--al-border);
  border-radius: var(--al-radius-inp);
  font-size:     15px;
  font-family:   var(--al-font-body);
  font-weight:   400;
  color:         var(--al-text);
  background:    var(--al-input-bg);
  outline:       none;
  transition:    border-color .22s var(--al-ease), box-shadow .22s var(--al-ease), background .22s;
}
.al-otp-input::placeholder { color:#C8B8B8; }
.al-otp-input:hover  { border-color: #D4B8B8; }
.al-otp-input:focus  {
  border-color: var(--al-red);
  background:   var(--al-white);
  box-shadow:   0 0 0 4px rgba(139,0,0,.09);
}

/* ── Primary button ───────────────────────────────────────── */
.al-otp-btn--primary {
  display:        block;
  width:          100%;
  margin-top:     18px;
  padding:        15px 28px;
  background:     linear-gradient(135deg, var(--al-red) 0%, var(--al-red-deep) 100%);
  color:          var(--al-white);
  border:         none;
  border-radius:  var(--al-radius-btn);
  font-family:    var(--al-font-body);
  font-size:      13px;
  font-weight:    600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  cursor:         pointer;
  position:       relative;
  overflow:       hidden;
  transition:     transform .22s var(--al-ease), box-shadow .22s var(--al-ease), background .22s;
  box-shadow:     0 4px 16px rgba(139,0,0,.25), 0 1px 3px rgba(0,0,0,.12);
}
/* Shine sweep */
.al-otp-btn--primary::before {
  content:    '';
  position:   absolute;
  top:        0; left:-100%;
  width:      60%;
  height:     100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transition: left .5s var(--al-ease);
}
.al-otp-btn--primary:hover {
  transform:  translateY(-2px);
  box-shadow: 0 10px 28px rgba(139,0,0,.32), 0 2px 6px rgba(0,0,0,.12);
}
.al-otp-btn--primary:hover::before { left:140%; }
.al-otp-btn--primary:active  { transform:translateY(0); box-shadow: var(--al-shadow-sm); }
.al-otp-btn--primary:disabled { opacity:.52; cursor:not-allowed; transform:none; box-shadow:none; }

/* Spinner */
.al-otp-btn--primary.loading { color:transparent !important; }
.al-otp-btn--primary.loading::after {
  content:      '';
  position:     absolute;
  top:50%; left:50%;
  width:17px; height:17px;
  margin:-8.5px 0 0 -8.5px;
  border:       2.5px solid rgba(255,255,255,.35);
  border-top-color:#fff;
  border-radius:50%;
  animation:    al-spin .65s linear infinite;
}
@keyframes al-spin { to { transform:rotate(360deg); } }

/* ── Six digit OTP boxes ──────────────────────────────────── */
.al-otp-digit-group {
  display:         flex;
  gap:             9px;
  justify-content: center;
  margin-bottom:   6px;
}
.al-otp-digit {
  width:         48px;
  height:        58px;
  text-align:    center;
  font-family:   var(--al-font-head);
  font-size:     26px;
  font-weight:   600;
  border:        1.5px solid var(--al-border);
  border-radius: 12px;
  color:         var(--al-red);
  background:    var(--al-input-bg);
  outline:       none;
  transition:    border-color .2s, box-shadow .2s, background .2s, transform .15s;
  caret-color:   var(--al-red);
}
.al-otp-digit:hover  { border-color: #D4B8B8; }
.al-otp-digit:focus  {
  border-color: var(--al-red);
  background:   var(--al-white);
  box-shadow:   0 0 0 4px rgba(139,0,0,.09);
  transform:    scale(1.04);
}
.al-otp-digit.filled {
  background:   rgba(139,0,0,.04);
  border-color: rgba(139,0,0,.4);
}

/* ── Error ────────────────────────────────────────────────── */
.al-otp-error {
  background:    rgba(139,0,0,.05);
  border:        1px solid rgba(139,0,0,.18);
  border-left:   3px solid var(--al-red);
  border-radius: 10px;
  padding:       11px 15px;
  color:         var(--al-red-deep);
  font-size:     13px;
  margin-bottom: 16px;
  line-height:   1.5;
}

/* ── Expiry note ──────────────────────────────────────────── */
.al-otp-expiry-note {
  text-align:   center;
  font-size:    12px;
  color:        var(--al-muted);
  margin-top:   12px;
  letter-spacing:.1px;
}
.al-otp-expiry-note strong { color:var(--al-red); font-weight:600; }

/* ── Back link ────────────────────────────────────────────── */
.al-otp-link {
  display:    block;
  width:      100%;
  background: none;
  border:     none;
  color:      var(--al-muted);
  font-size:  13px;
  font-family:var(--al-font-body);
  cursor:     pointer;
  text-align: center;
  margin-top: 18px;
  padding:    0;
  letter-spacing:.2px;
  transition: color .2s;
}
.al-otp-link:hover { color:var(--al-red); }

/* ── Footer ───────────────────────────────────────────────── */
.al-otp-footer {
  margin-top:     28px;
  display:        flex;
  gap:            20px;
  justify-content:center;
  animation:      al-card-in .5s .15s var(--al-ease) both;
}
.al-otp-footer a {
  color:           var(--al-muted);
  font-size:       12px;
  text-decoration: none;
  letter-spacing:  .2px;
  transition:      color .2s;
}
.al-otp-footer a:hover { color:var(--al-red); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .al-otp-card         { padding:38px 22px 32px; border-radius:16px; }
  .al-otp-digit        { width:42px; height:52px; font-size:22px; }
  .al-otp-digit-group  { gap:7px; }
  .al-otp-heading      { font-size:24px; }
}

/* ============================================================
   Account Icon — shortcode only, no auto-injection
   ============================================================ */
.al-otp-icon-link {
  display:         inline-flex;
  align-items:     center;
  gap:             7px;
  color:           inherit;
  text-decoration: none;
  padding:         6px 4px;
  line-height:     1;
  transition:      color .2s, opacity .2s;
  font-family:     var(--al-font-body, inherit);
}
.al-otp-icon-link:hover { color: var(--al-red, #8B0000); }
.al-otp-svg { width:22px; height:22px; flex-shrink:0; }
.al-otp-icon-label { font-size:13px; font-weight:500; letter-spacing:.3px; }
@media(max-width:768px){ .al-otp-icon-label{ display:none; } }
