/* ---------- Storefront auth screens (login / register / password / etc.)
     Loaded from <head> via style.blade.php so it survives Vue mounting on
     #app -- the auth pages are wrapped in the same #app tree.

     Restyles the shared shell in resources/views/frontend/layouts/auth.blade.php
     to match the reference: a white card with the form on the leading side
     and a food-photo panel on the trailing side, with the social buttons
     sitting on a yellow band at the bottom of the photo.

     Nothing here touches the form, its inputs or its logic -- only the
     shell's visual style.
   -------------------------------------------------------------------- */

/* Page surround */
.vf-scope { background: #f5f5f7 !important; padding: 40px 0 !important; }

/* Card. Row on desktop, column-reverse on mobile so the form is always
   on top -- an auth page where the visitor scrolls past a photo to reach
   the inputs is a page nobody signs into. */
.vf-auth {
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .10) !important;
    display: flex !important;
    flex-direction: row !important;
    max-width: 1040px !important;
    margin: 40px auto !important;
    overflow: hidden !important;
    min-height: 560px;
}
@media (max-width: 767px) {
    .vf-auth { flex-direction: column-reverse !important; margin: 20px auto !important; }
}

/* ---------- Form panel (leading side) ---------- */
.vf-auth__panel {
    order: 1;
    flex: 1 1 50%;
    background: #ffffff !important;
    padding: 56px 48px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.vf-auth__inner { max-width: 380px; margin: 0 auto; width: 100%; }

/* "Welcome to" / "Sign In" style headings. The Blade already prints
   auth_title (e.g. "Login") and auth_subtitle -- we just restyle them
   so the h1 reads as the friendly greeting and the sub-line reads as
   the action. Both texts still come from the section values. */
.vf-auth__title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #2a2a3a !important;
    text-align: center !important;
    margin: 0 0 6px !important;
}
.vf-auth__sub {
    font-size: 1rem !important;
    color: #666 !important;
    text-align: center !important;
    margin: 0 0 30px !important;
}

/* Inputs -- the login form uses .vf-input already. Style them as the
   softly-outlined boxes with a leading icon like the reference. */
.vf-auth__panel .vf-field { margin-bottom: 16px; }
.vf-auth__panel .vf-label {
    display: block;
    font-size: 13px;
    color: #2a2a3a;
    margin-bottom: 6px;
}
.vf-auth__panel .vf-input {
    width: 100% !important;
    height: 48px !important;
    padding: 10px 14px !important;
    border: 1px solid #e0e0e5 !important;
    border-radius: 6px !important;
    background: #fafafc !important;
    font-size: 14px !important;
    color: #2a2a3a !important;
    outline: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.vf-auth__panel .vf-input:focus {
    border-color: #ffb84d !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(255, 184, 77, .18) !important;
}

/* Input group with the show/hide password button */
.vf-auth__panel .vf-input-group { position: relative; }
.vf-auth__panel .vf-input-affix {
    position: absolute;
    top: 50%;
    inset-inline-end: 12px;
    transform: translateY(-50%);
    background: none;
    border: 0;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

/* Login button -- reference is a soft yellow filled pill */
.vf-auth__panel .vf-btn {
    width: 100% !important;
    height: 48px !important;
    border-radius: 6px !important;
    background: #ffb84d !important;
    border-color: #ffb84d !important;
    color: #2a2a3a !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    letter-spacing: .02em;
    transition: background-color .15s ease;
}
.vf-auth__panel .vf-btn:hover { background: #f5a933 !important; border-color: #f5a933 !important; }

/* ---------- Role switcher (shown above every auth form) ---------- */
.vf-role-switch { margin: 0 0 22px; }
.vf-role-switch__lede {
    font-size: 13px;
    font-weight: 600;
    color: #6b6b7b;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 10px;
}
.vf-role-switch__tabs {
    display: grid;
    gap: 10px;
}
.vf-role-switch__tabs--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vf-role-switch__tabs--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 520px) {
    .vf-role-switch__tabs--2,
    .vf-role-switch__tabs--3 { grid-template-columns: 1fr; }
}
.vf-role-switch__tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border: 1.5px solid #e5e5ec;
    border-radius: 12px;
    background: #fafafd;
    color: #2a2a3a;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease, transform .15s ease;
    position: relative;
}
.vf-role-switch__tab:hover {
    border-color: #5b2a86;
    background: #fff;
    box-shadow: 0 4px 14px rgba(91, 42, 134, .08);
    text-decoration: none;
    color: #2a2a3a;
    transform: translateY(-1px);
}
.vf-role-switch__tab.is-active {
    border-color: #5b2a86;
    background: #fff;
    box-shadow: 0 6px 18px rgba(91, 42, 134, .14);
    cursor: default;
}
.vf-role-switch__icon {
    flex: 0 0 auto;
    width: 38px; height: 38px;
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 10px;
    background: rgba(91, 42, 134, .10);
    color: #5b2a86;
    font-size: 16px;
}
.vf-role-switch__tab.is-active .vf-role-switch__icon {
    background: #5b2a86;
    color: #fff;
}
.vf-role-switch__body {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}
.vf-role-switch__label {
    font-weight: 700;
    font-size: 14px;
}
.vf-role-switch__hint {
    font-size: 12px;
    color: #6b6b7b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vf-role-switch__badge {
    position: absolute;
    top: 8px; inset-inline-end: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #5b2a86;
    background: rgba(91, 42, 134, .12);
    padding: 2px 6px;
    border-radius: 999px;
}

/* Foot links */
.vf-auth__foot,
.vf-auth__alt {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin: 18px 0 0 !important;
}
.vf-auth__foot a,
.vf-auth__alt a { color: #2a2a3a; text-decoration: none; }
.vf-auth__foot a:hover,
.vf-auth__alt a:hover { color: #5b2a86; text-decoration: underline; }

/* Remember-me / forgot-password row */
.vf-auth__panel .form-check { padding-inline-start: 0; }
.vf-auth__panel .form-check .form-check-input { margin-inline-end: 6px; }

/* ---------- Brand panel (trailing side) ---------- */
.vf-auth__brand {
    order: 2;
    flex: 1 1 50%;
    position: relative;
    background: #2b1a4a center/cover no-repeat;
    /* Photo panel. Save the image at
         public/assets/images/frontend/auth/auth.png
       Every auth screen (login, register, forgot / reset password,
       supplier variants) shares this single background. */
    background-image: url('/assets/images/frontend/auth/auth.png');
    color: #fff;
    padding: 40px 30px 0 !important;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0;
}

/* Hide the layout's default logo + intro on the food panel -- the
   reference is photo-first, and the site header already carries the
   brand mark. */
.vf-auth__brand-logo,
.vf-auth__brand-title,
.vf-auth__brand-text,
.vf-auth__points { display: none !important; }

/* "Sign Up with" caption sits above the yellow social bar. Injected as
   a pseudo-element so we do not have to touch the layout blade. */
.vf-auth__brand::before {
    content: 'Sign Up with';
    display: block;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 6px 8px 12px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
html[lang="ar"] .vf-auth__brand::before,
body.rtl .vf-auth__brand::before { content: 'سجّل الدخول عبر'; }

/* Yellow social band pinned to the bottom of the food panel. The
   .vf-social-login partial renders a <ul> of icon links here; we
   restyle whatever it produces without editing it. */
.vf-auth__brand .vf-social-login,
.vf-auth__brand ul,
.vf-auth__brand .social-login,
.vf-auth__brand + .vf-social-login {
    background: #ffb84d;
    padding: 14px 20px !important;
    margin: 0 -30px !important;
    display: flex !important;
    gap: 14px;
    justify-content: center;
    list-style: none;
}
.vf-auth__brand a[class*="btn"],
.vf-auth__brand a[href*="oauth"],
.vf-auth__brand a[href*="social"],
.vf-auth__brand ul li a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid #fff;
    color: #fff !important;
    font-size: 13px;
    text-decoration: none !important;
    background: transparent !important;
}
.vf-auth__brand a:hover { background: #fff !important; color: #ffb84d !important; }

/* Mobile: the panel collapses to a top image band so the form is what
   fills the visible area. */
@media (max-width: 767px) {
    .vf-auth__brand {
        min-height: 220px !important;
        padding: 20px 20px 0 !important;
    }
    .vf-auth__panel { padding: 32px 24px !important; }
}

/* ---------- Post-register success overlay ---------- */
.vf-auth-success {
    position: fixed;
    inset: 0;
    background: rgba(24, 20, 44, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity .22s ease;
    padding: 20px;
}
.vf-auth-success.is-visible { opacity: 1; }
.vf-auth-success__card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(24, 20, 44, .28);
    transform: translateY(8px) scale(.98);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.vf-auth-success.is-visible .vf-auth-success__card {
    transform: translateY(0) scale(1);
}
.vf-auth-success__check {
    width: 72px; height: 72px;
    margin: 0 auto 16px;
}
.vf-auth-success__check svg {
    width: 100%; height: 100%;
    stroke: #21a179;
    animation: vfCheckPop .5s cubic-bezier(.2, .8, .2, 1) both;
}
.vf-auth-success__check circle { stroke-dasharray: 151; stroke-dashoffset: 151; animation: vfDraw .55s ease forwards; }
.vf-auth-success__check path   { stroke-dasharray: 60;  stroke-dashoffset: 60;  animation: vfDraw .35s ease .45s forwards; }
@keyframes vfDraw    { to { stroke-dashoffset: 0; } }
@keyframes vfCheckPop { 0% { transform: scale(.6); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
.vf-auth-success__title {
    font-size: 20px;
    font-weight: 700;
    color: #1e1a35;
    margin: 0 0 6px;
}
.vf-auth-success__msg {
    font-size: 14px;
    color: #55556a;
    margin: 0 0 18px;
    line-height: 1.5;
}
.vf-auth-success__bar {
    height: 4px;
    background: #eee;
    border-radius: 999px;
    overflow: hidden;
    margin: 0 0 10px;
}
.vf-auth-success__bar span {
    display: block;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #5b2a86, #f5a933);
}
.vf-auth-success__hint {
    font-size: 12px;
    color: #8b8ba0;
    margin: 0;
    letter-spacing: .04em;
    text-transform: uppercase;
}
