/* =====================================================================
   Tappy Admin — Auth wizard (Login / Agency sign-up)
   Mirrors the Client registration flow: a card carousel beside a
   step-by-step panel that uses the SAME client classes (tp-input-pill,
   tp-btn-primary, step-input-row, back-btn, mobi carousel ...).
   Client CSS is reused verbatim; --tap-* tokens are bridged to the
   admin --admin-* tokens so they resolve on the standalone auth page in
   both light and dark.
   ===================================================================== */

/* --- Bridge the client --tap-* tokens to admin tokens (both themes) --- */
:root {
    /* Input background matches the client login exactly (light: #fff) so the
       tp-input-pill colour + box-shadow read identically on both apps. */
    --tap-bg: #ffffff;
    --tap-body-text: var(--admin-text-primary);
    --tap-grey: var(--admin-muted);
    --tap-bold: 700;
    --tap-medium: 500;
}
[data-theme="dark"] {
    /* Client dark input background */
    --tap-bg: #000319;
}

/* ------------------------------------------------------------------ *
 *  Layout — client "registration-container" card: a 400px centered card,
 *  content flowing from the TOP (carousel → welcome / steps).
 * ------------------------------------------------------------------ */
.auth-wizard {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: flex-start;          /* start from the top, not the middle */
    justify-content: center;
    background: var(--admin-bg);
    color: var(--admin-text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}
/* Same values as the client .registration-container (desktop) */
.registration-container {
    width: 100%;
    max-width: 400px;
    margin: 1rem auto 20px;
    background: var(--admin-surface);
    border-radius: 30px;
    box-shadow: var(--tap-gradibutts-before-box-shadow);
    box-sizing: border-box;
    overflow: auto;
    height: 100vh;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.registration-container.wallet-profile {
    background: var(--admin-bg);
}
.registration-container .reg-box { padding: 0 1rem 1rem 1rem; }
.auth-visual {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .25rem;
}
/* Welcome step — centered (title, subtitle, buttons) */
#step-welcome { text-align: center; align-items: center; }
#step-welcome .welcome-buttons { width: 100%; justify-content: center; }

/* ------------------------------------------------------------------ *
 *  Step container + slide animations (ported from RegisterUnified)
 * ------------------------------------------------------------------ */
/* Clip the sliding steps (so a mid-animation step never bleeds below the
   current one), but don't let the box shrink — it grows with its content and
   the outer card scrolls, keeping the action button reachable. */
.reg-box { position: relative; overflow: hidden; flex-shrink: 0; width: 100%; margin: 0 auto; }
.reg-header {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 42px;
    margin-bottom: .5rem;
}
.reg-header.is-hidden { visibility: hidden; }
.reg-steps-inner { position: relative; }

.reg-step { display: none; position: relative; width: 100%; backface-visibility: hidden; }
.reg-step.active { display: flex; flex-direction: column; gap: .55rem; }
/* Compact the wizard inputs a touch so taller steps (e.g. Location) keep the
   action button in view without scrolling. */
.reg-step .tp-input-pill { height: 42px; }

.slide-next-enter { display: block !important; animation: aw-slideInRight .45s cubic-bezier(0.25,1,0.5,1) forwards; position: absolute; top: 0; left: 0; width: 100%; z-index: 2; }
.slide-next-exit  { display: block !important; animation: aw-slideOutLeft  .45s cubic-bezier(0.25,1,0.5,1) forwards; z-index: 1; }
.slide-back-enter { display: block !important; animation: aw-slideInLeft   .45s cubic-bezier(0.25,1,0.5,1) forwards; position: absolute; top: 0; left: 0; width: 100%; z-index: 2; }
.slide-back-exit  { display: block !important; animation: aw-slideOutRight .45s cubic-bezier(0.25,1,0.5,1) forwards; z-index: 1; }
@keyframes aw-slideInRight { from { transform: translateX(100%);  opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes aw-slideInLeft  { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes aw-slideOutLeft { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-100%); opacity: 0; } }
@keyframes aw-slideOutRight{ from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%);  opacity: 0; } }

/* ------------------------------------------------------------------ *
 *  Step typography
 * ------------------------------------------------------------------ */
.auth-step-title { font-size: 1.3rem; font-weight: 700; line-height: 1.2; margin: 0; color: var(--admin-text-primary); }
.auth-step-sub { font-size: .9rem; color: var(--admin-text-secondary); margin: -.25rem 0 .25rem; }

.form-label { font-size: 1rem; font-weight: var(--tap-medium); color: var(--tap-body-text); margin-bottom: 0; }
.form-label .req { color: #e5484d; margin-left: 2px; }
.step-goal-header { display: flex; justify-content: space-between; align-items: flex-end; margin: 0 0 .25rem 0; }

/* ------------------------------------------------------------------ *
 *  Inputs + enter button — client classes (verbatim values)
 * ------------------------------------------------------------------ */
.step-input-row { display: flex; gap: 12px; align-items: center; width: 100%; }
.step-input-wrapper { flex: 1; display: flex; align-items: center; gap: 1rem; }
.step-input-wrapper .tp-input-pill { width: 100%; }

.tp-input-pill {
    width: 100%;
    height: 45px;
    padding: 2px 1.25rem 0px;
    border-radius: 15px;
    border: none !important;
    background: var(--tap-bg);
    color: var(--tap-body-text);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: var(--tap-gradibutts-before-box-shadow);
    letter-spacing: 0.2px;
}
.tp-input-pill:focus { box-shadow: var(--tap-inputfield-focus-box-shadow); border-color: var(--tap-blue); }
.tp-input-pill::placeholder { color: var(--tap-grey); font-weight: var(--tap-medium); opacity: 0.5; }

.tp-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--tap-bold) !important;
    color: var(--tap-blue) !important;
    border: 0 !important;
    cursor: pointer;
    padding: 12px 24px 8px;
    text-align: center;
    border-radius: 18px;
    height: 50px;
    letter-spacing: 0.3px;
    font-size: 1rem;
    background: var(--tap-gradibutts-before-background);
    box-shadow: var(--tap-gradibutts-before-box-shadow);
    outline: none;
    gap: 8px;
    white-space: nowrap;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.1s, color 0.1s;
    line-height: 1;
}
.tp-btn-primary:hover { color: #ffffff !important; background: var(--tap-grad) !important; transform: translateY(-1px) scale(1.01); }
.tp-btn-primary:active { background: var(--tap-blue) !important; color: #fff !important; transform: translateY(2px) scale(0.97); }
.tp-btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.tp-btn-icon { flex-direction: column; gap: 0px; }
.tp-btn-icon .btn-icon { font-size: 1.2rem; display: inline-flex; align-items: center; }
.input-enter-btn { min-width: 84px; }

.text-danger { color: #e5484d !important; font-size: .85rem; }
.field-error { color: #e5484d; font-size: .82rem; min-height: 1rem; }

/* File uploads */
.auth-file {
    display: block;
    border: 1px dashed var(--admin-border);
    border-radius: 14px;
    padding: .85rem 1rem;
    background: var(--admin-input-bg);
    color: var(--admin-text-secondary);
    font-size: .9rem;
    cursor: pointer;
}
.auth-file input[type="file"] { display: block; margin-top: .4rem; width: 100%; color: var(--admin-text-primary); }

/* ------------------------------------------------------------------ *
 *  Image upload placeholder + cropper (ported from the client
 *  registration flow — banner + profile/logo upload with crop).
 * ------------------------------------------------------------------ */
.upload-placeholder {
    width: 100%;
    height: 150px;
    border: 2px dashed var(--tap-blue);
    border-radius: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    background: rgba(21, 117, 251, 0.05);
    color: var(--tap-blue);
    text-align: center;
    gap: 4px;
}
.upload-placeholder .upload-icon { font-size: 1.8rem; line-height: 1; }
.upload-placeholder .upload-hint { font-size: .85rem; font-weight: var(--tap-medium); }
.upload-placeholder.has-image .upload-icon,
.upload-placeholder.has-image .upload-hint { display: none; }
.upload-placeholder.has-image {
    border: none;
    background: var(--tap-bg);
    padding: 0.5rem;
    box-shadow: var(--tap-gradibutts-before-box-shadow);
}
.upload-placeholder .preview-img { display: none; }
.upload-placeholder.has-image .preview-img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 11px;
}
/* Profile/logo variant — a centered square avatar */
.upload-placeholder.profile-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 18px;
    margin: 0 auto;
}

/* Cropper modal — exact same structure/classes as the client registration
   cropper (Bootstrap .modal). Dark backdrop + white content + overlaid bar. */
#cropperModal.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 20000;
    overflow: auto;
}
/* Replicate .modal-dialog-centered (not present in this bundle) so the dialog
   sits centered like the client cropper. */
#cropperModal .modal-dialog {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    margin: 0 auto;
}
#cropperModal .modal-content { background: #fff; width: 100%; }
.cropper-btn-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    z-index: 9999;
}
/* Client "Cancel" button — red gradient pill (mirrors client .button-danger) */
.cropper-btn-bar .button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 45px;
    padding: 12px 24px 8px;
    border-radius: 15px;
    border: 0;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    background: linear-gradient(90deg, #ff004f, #ff6a88);
    box-shadow: var(--tap-gradibutts-before-box-shadow);
}
/* "Apply" uses the shared .tp-btn-primary (light pill, blue text) already defined. */
.cropper-btn-bar .tp-btn-primary { min-width: 120px; height: 45px; }

/* ------------------------------------------------------------------ *
 *  Back arrow (client back-btn) + password toggle + forgot link
 * ------------------------------------------------------------------ */
.back-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--tap-gradibutts-before-box-shadow);
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0px 7px 2px 4px;
    background: var(--tap-gradibutts-before-background);
    border: 0;
}
.back-btn:hover { transform: scale(1.08); }
.back-btn svg { width: 18px; height: 18px; stroke: var(--tap-blue); stroke-width: 3; }

.pwd-field { position: relative; display: flex; align-items: center; width: 100%; }
.pwd-field .tp-input-pill { padding-right: 3rem; }
.pwd-toggle {
    position: absolute; right: .9rem; background: transparent; border: 0;
    color: var(--admin-icon); cursor: pointer; padding: .3rem; line-height: 1;
}
.pwd-toggle:hover { color: var(--admin-accent); }

.auth-forgot {
    background: transparent; border: 0;
    color: var(--tap-blue); font-size: .9rem; font-weight: 600; cursor: pointer; padding: 0;
}
.auth-forgot:hover { text-decoration: underline; }
.auth-signup-row {
    display: flex; align-items: center; flex-wrap: wrap; gap: .35rem;
    font-size: .9rem; color: var(--admin-text-secondary); margin-top: .2rem;
}
.auth-signup-sep { color: var(--admin-muted); }

.auth-row { display: flex; gap: .75rem; }
.auth-row > div { flex: 1; min-width: 0; }

/* Welcome choice buttons (Admin / Agency) — client .button.button-primary in a row */
.welcome-buttons { display: flex; gap: 15px; margin: 1.5rem 0 0; }
.button {
    padding: 12px 16px;
    border-radius: 18px;
    border: none;
    font-size: 13px;
    font-weight: var(--tap-bold);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    width: 100%;
    letter-spacing: 0.3px;
}
.button-primary {
    color: #ffffff !important;
    background: var(--tap-blue);
    box-shadow: inset 3px 3px 6px #4779ff, inset -3px -3px 6px #0091dc;
}
.button-primary:hover { background: #0d6efd; box-shadow: var(--tap-gradibutts-before-box-shadow); color: #fff; }
.button-primary:active { transform: translateY(1px); }

/* ==================================================================== *
 *  Carousel — ported "mobi" slider (Client common.css)
 * ==================================================================== */
.mobi-mobi_right-stack { width: 100%; max-width: 100%; z-index: 2; max-height: 320px; overflow: hidden; display: flex; align-items: center; justify-content: center; position: relative; }
.mobi-mobi_right-stack .mobi_contain_ani { display: flex; justify-content: center; height: 320px; width: 100%; background-color: transparent; }
.mobi-mobi_right-stack .mobi-image-stack { position: relative; display: flex; justify-content: center; align-items: center; height: 100%; width: 100%; }
.mobi-mobi_right-stack .mobi_cardbox { position: absolute; transition: transform 0.6s ease, opacity 0.6s ease; opacity: 0.4; z-index: 1; perspective: 650px; cursor: pointer; }
/* Card is 0.7x the client size so the carousel takes ~half the panel; the iframe
   renders the pay page at full 270x418 then scales down to fit (nothing cropped). */
.mobi-mobi_right-stack .mobi_card { position: relative; width: 189px; height: 293px; background: var(--admin-surface); border-radius: 26px; transform-style: preserve-3d; box-shadow: var(--tap-gradibutts-before-box-shadow); transform: rotateY(50deg) translateZ(20px); transition: 0.6s ease; overflow: hidden; }
.mobi-mobi_right-stack .mobi_card img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; display: block; background: var(--admin-surface); }
/* Live demo-profile pay pages framed inside the cards (full page, scaled to fit) */
.mobi-mobi_right-stack .mobi_card iframe { width: 270px; height: 418px; border: 0; display: block; background: #fff; pointer-events: none; transform: scale(0.7); transform-origin: top left; }
.mobi-mobi_right-stack .mobi_card .preview-overlay { position: absolute; inset: 0; z-index: 3; background: transparent; }

.mobi-mobi_right-stack .mobi-nav-btn { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; background: var(--admin-surface); border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: var(--tap-gradibutts-before-box-shadow); border: 1px solid var(--admin-border); cursor: pointer; z-index: 20; color: var(--tap-blue); font-size: 1.2rem; transition: all 0.3s ease; }
.mobi-mobi_right-stack .mobi-nav-btn:hover { background: var(--admin-surface-secondary); transform: translateY(-50%) scale(1.1); }
.mobi-mobi_right-stack .mobi-nav-prev { left: 15px; }
.mobi-mobi_right-stack .mobi-nav-next { right: 15px; }

.mobi-mobi_right-stack .mobi-pagination { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: none; gap: 8px; z-index: 20; }
.mobi-mobi_right-stack .mobi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--admin-border); cursor: pointer; transition: all 0.3s ease; }
.mobi-mobi_right-stack .mobi-dot.active { background: var(--tap-blue); width: 20px; border-radius: 4px; }

.mobi-mobi_right-stack .mobi_cardbox.mobi_focus { transform: translateX(0) translateY(-14px); opacity: 1; z-index: 10; }
.mobi-mobi_right-stack .mobi_cardbox.mobi_focus .mobi_card { transform: rotateY(0deg); }
.mobi-mobi_right-stack .mobi_cardbox.mobi_left { transform: translateX(-77px) translateY(-4px); opacity: 0.8; z-index: 5; }
.mobi-mobi_right-stack .mobi_cardbox.mobi_left .mobi_card { transform: rotateY(35deg); }
.mobi-mobi_right-stack .mobi_cardbox.mobi_right { transform: translateX(77px) translateY(-4px); opacity: 0.8; z-index: 5; }
.mobi-mobi_right-stack .mobi_cardbox.mobi_right .mobi_card { transform: rotateY(-35deg); }
.mobi-mobi_right-stack .mobi_cardbox.hidden-mobi_left { transform: translateX(-175px) scale(0.8); opacity: 0; z-index: 0; }
.mobi-mobi_right-stack .mobi_cardbox.hidden-mobi_right { transform: translateX(175px) scale(0.8); opacity: 0; z-index: 0; }

/* Google Places dropdown */
.pac-container { z-index: 100000 !important; border-radius: 10px; margin-top: 4px; }

/* ------------------------------------------------------------------ *
 *  Loader overlay (mirrors the client's process-exit-view-loader)
 * ------------------------------------------------------------------ */
.auth-loader {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: none;
    align-items: center;
    justify-content: center;
    background: transparent;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}
.auth-loader.show { display: flex; }
/* Tappy Lottie loader (same glyph as the client records tab) */
.loading_ani_icon_cont {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    position: relative;
}
.loadie-container {
    width: 90px;
    height: 90px;
    margin: 0 auto;
}
@keyframes aw-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ *
 *  Responsive — stack carousel above the steps on tablet / mobile
 * ------------------------------------------------------------------ */
@media (max-width: 480px) {
    .mobi-mobi_right-stack { max-height: 340px; }
    .mobi-mobi_right-stack .mobi_contain_ani { height: 330px; }
    .mobi-mobi_right-stack .mobi_card { width: 200px; height: 306px; }
    .auth-row { flex-direction: column; gap: .9rem; }
    .auth-step-title { font-size: 1.35rem; }
}
