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


.loginContainer {
    height: 450px;
    width: 350px;
    position: fixed;
    box-shadow: 0 4px 50px rgba(0, 0, 0, 0.493);
    border-radius: 15px;
    backdrop-filter: blur(20px);
    background: rgba(0, 0, 0, 0.527);
    color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 10px;
    z-index: 200;
    overflow: hidden;
    display: none;
    animation: fadeInDrop 0.6s ease-out forwards;
    justify-content: center;
    align-items: center;
}
@keyframes fadeInDrop {
    0% {
      opacity: 0;
      transform: translate(-50%, -60%);
    }
    100% {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
}
.resetPasswordLink{
    cursor: pointer;
    transition: all 0.3s ease;
}
.resetPasswordLink:hover{
    color: white;
   }
.resetPasswordHeading{
    position: relative;
    left: 60px;
   }
.resetPasswordParagraph{
    position: relative;
    left: 60px;
    font-size: medium;
    color: #c7c7c7;
    width: 100%;
}
.recoverOldAccountLink{
    cursor: pointer;
    transition: all 0.3s ease;
}
.recoverOldAccountLink:hover{
     color: white;
}
#returnToLogin{
    position: relative;
  
    left: 30px;
    background-color: black;
}
#forgotPasswordEmail{
    width: 60%;
}
#forgotPasswordForm{
    position: relative;
    left: 60px;
}
#loginPopup {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: center;
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    height: 100%;
    width: 100%;
    position: relative;
    text-align: left;
}

#loginPopup h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 10px;
}

#loginPopup h5 {
    font-size: 14px;
    margin-top: -10px;
    color: rgba(255, 255, 255, 0.7);
}
.loginPopupContent{
    display: flex;
    justify-content: center;
    flex-direction: column;
    width: 93%;
    position: relative;
    top: 30px; 
    left: 20px; 

}
#closeLoginPopUp, #closeResetPassword, #returnToLogin {
    position: absolute;
    font-size: 20px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
    background-color: black;
    z-index: 10;
    transition: background-color 0.3s ease transform 0.3s ease;
}
#closeLoginPopUp{
    border-bottom-left-radius: 30px;
    top: -20px;
    right: -15px;
    padding-top: 15px;
    padding-right: 16px;
    padding-left: 13px;
    padding-bottom: 5px;
}
#returnToLogin{
    transition: all 0.3s ease;
    transform: translate(180deg);
    border-bottom-right-radius: 30px;
    position: absolute;
    top: -15px;
    left: -15px;
    padding-top: 15px;
    padding-right: 13px;
    padding-left: 16px;
    padding-bottom: 5px;
}
#returnToLogin:hover{
    background-color: #8a0101;
   
}
#returnToLogin svg{
    height: 30px;
    width: 30px;
    fill: white;
    transform: rotate(180deg);
}
#closeResetPassword:hover, #closeLoginPopUp:hover #returnToLogin:hover{
    background-color: #8a0101;
}

#closeLoginPopUp:hover {
    transform: scale(1.2);
    color: #ff5c5c;
}

.loginInput{ width: 75%; }
.searchForAccountInput{
    width: 100%;
}
.loginInput, .searchForAccountInput, .newPwd, .newPwd2{
    background-color: rgba(255, 255, 255, 0.596);
    color: white;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0 15px;
    outline: none;
    font-size: 14px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.loginInput:focus {
    border-color: #01438a;
    background-color: rgba(255, 255, 255, 0.2);
}

.input-group {
    width: 100%;
    position: relative;
}

#togglePassword{
    position: absolute;
    top: 10px;
    cursor: pointer;
    right: 65px;
}

#loginPopup button {
    background: linear-gradient(90deg, #8a0101, #f15e5e);
    background-size: 200% 100%;
    color: white;
    width: 120px;
    height: 40px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-position 0.3s ease, transform 0.2s ease;
}

#loginPopup button:hover {
    background-position: 100% 0; /* Shift the gradient */
    transform: translateY(-2px);
}
.searchResultsContainer{
    display: none;
}
.searchUserContainer{
    display: flex;
    flex-direction: column;
}
.locateAccountButton{
    width: 100% !important;
}
.recoverOldAccountContainer{
    display: block;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    font-family: "Poppins", sans-serif;
    font-weight: 300;
    position: relative;
    top: 30px;
    left: 0px;
    text-align: left;
}
.userList{
    max-height: 160px;
    background-color: rgba(255, 255, 255, 0.356);
    border-radius: 5px; 
    overflow-y: scroll; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 0px; 
    position: relative;
    top: -10px;
}
.userResult {
    list-style-type: none;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    width: 80%; 
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin: 8px 0;
    padding: 12px 16px;

    font-family: Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #333;

    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: background-color 0.25s ease, 
                box-shadow 0.25s ease, 
                transform 0.15s ease;
}
.userResult:hover {
    background-color: #f0f7ff; /* soft hover tint */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.userResult:active {
    background-color: #e1efff;  /* pressed effect */
    transform: translateY(0);   /* button presses down */
}

.userResult:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.userResult p{
    margin: 0px ; 
}
.userResult h5{
    margin: 0px !important; 
    color: black !important;
}
.continueAfterAccountFoundButton{
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    bottom: -24px;
    width: 100% !important;
    height: 35px;
}
/* Overlay */
.verify-pop-overlay{
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: rgba(0,0,0,.35);
  z-index: 100000;
  animation: vp-overlay-in .25s ease forwards;
}
.verify-pop-overlay.vp-exit{ animation: vp-overlay-out .25s ease forwards; }
@keyframes vp-overlay-in { from{opacity:0} to{opacity:1} }
@keyframes vp-overlay-out{ from{opacity:1} to{opacity:0} }

/* Card */
.verify-pop-card{
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  width: min(420px, 90vw);
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg,#16a34a,#059669);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  transform: scale(.7);
  opacity: 0;
  animation: vp-balloon-in 550ms cubic-bezier(.2,.9,.25,1.35) forwards;
}
@keyframes vp-balloon-in{
  0%   { transform: scale(.7);  opacity: 0; }
  60%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1);   opacity: 1; }
}
.verify-pop-overlay.vp-exit .verify-pop-card{
  animation: vp-pop-out 380ms cubic-bezier(.55,.01,1,.45) forwards;
}
@keyframes vp-pop-out{
  0%   { transform: scale(1);   opacity: 1; }
  40%  { transform: scale(1.18); }
  100% { transform: scale(.6);  opacity: 0; }
}

/* Check drawing */
.verify-pop-card svg{ width: 42px; height: 42px; }
.verify-pop-card .circle,
.verify-pop-card .check{
  fill: none; stroke: #fff; stroke-width: 4;
  stroke-linecap: round; stroke-linejoin: round;
}
.verify-pop-card .circle{
  stroke-dasharray: 140; stroke-dashoffset: 140;
  animation: vp-dash .50s ease forwards;
}
.verify-pop-card .check{
  stroke-dasharray: 36; stroke-dashoffset: 36;
  animation: vp-dash .40s .25s ease forwards;
}
@keyframes vp-dash { to { stroke-dashoffset: 0; } }

/* Gentle ring “pop” */
.verify-ring{
  position:absolute; inset:0; border-radius:18px;
  box-shadow: 0 0 0 0 rgba(255,255,255,.25);
  pointer-events:none;
  animation: vp-ring 900ms .2s ease-out forwards;
}
@keyframes vp-ring{
  0%   { box-shadow: 0 0 0 0 rgba(255,255,255,.25); }
  100% { box-shadow: 0 0 0 16px rgba(255,255,255,0); }
}

@media (max-width: 400px) {
    .loginContainer {
        width: 90%;
        height: 400px;
        padding: 15px;
    }

    #loginPopup h2 {
        font-size: 20px;
    }

    #loginPopup button {
        width: 100%;
    }
}

/* Dedicated mobile login experience */
@media (max-width: 800px) {
    body.login-open {
        overflow: hidden;
    }

    .loginContainer {
        inset: 0;
        z-index: 10000;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        padding: 0;
        box-sizing: border-box;
        overflow: hidden;
        border-radius: 0;
        background: #fff;
        color: #191919;
        box-shadow: none;
        backdrop-filter: none;
        transform: none;
        animation: mobileLoginIn 180ms ease-out both;
    }

    @keyframes mobileLoginIn {
        from { opacity: 0; transform: translateY(12px); }
        to { opacity: 1; transform: translateY(0); }
    }

    #loginPopup {
        display: block;
        width: 100%;
        height: 100%;
        padding: max(86px, calc(env(safe-area-inset-top) + 70px)) 22px calc(30px + env(safe-area-inset-bottom));
        box-sizing: border-box;
        overflow-x: hidden;
        overflow-y: auto;
        background: #fff;
        color: #191919;
    }

    #loginPopup::before {
        content: "Quality Craft";
        position: absolute;
        top: max(20px, env(safe-area-inset-top));
        left: 22px;
        color: #202020;
        font-size: 15px;
        font-weight: 700;
    }

    .loginPopupContent,
    .recoverOldAccountContainer {
        position: static;
        width: min(100%, 440px);
        margin: 0 auto;
        color: #191919;
    }

    #loginPopup h2 {
        margin: 0 0 8px;
        color: #191919;
        font-size: 30px;
        font-weight: 700;
        line-height: 1.25;
    }

    .loginPopupContent > h2::after {
        content: "Sign in to access your account and cart.";
        display: block;
        margin-top: 8px;
        color: #6b6b6b;
        font-size: 14px;
        font-weight: 400;
    }

    .loginFormContainer {
        margin-top: 30px;
    }

    .loginInput,
    .searchForAccountInput,
    .newPwd,
    .newPwd2 {
        width: 100%;
        height: 52px;
        margin: 0 0 14px;
        padding: 0 46px 0 15px;
        box-sizing: border-box;
        border: 1px solid #d6d6d6;
        border-radius: 7px;
        background: #f7f7f7;
        color: #1d1d1d;
        font-size: 16px;
    }

    .loginInput::placeholder,
    .searchForAccountInput::placeholder,
    .newPwd::placeholder,
    .newPwd2::placeholder {
        color: #797979;
    }

    .loginInput:focus,
    .searchForAccountInput:focus,
    .newPwd:focus,
    .newPwd2:focus {
        border-color: #a10d14;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(161, 13, 20, 0.12);
    }

    #togglePassword {
        top: 14px;
        right: 14px;
    }

    #togglePassword svg {
        fill: #666;
    }

    #loginPopup h5 {
        margin: 4px 0 16px;
        color: #606060;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.5;
    }

    #loginPopup h5 a {
        margin-left: 5px;
        color: #920b11;
        font-weight: 700;
        text-decoration: none;
    }

    .recoverOldAccountLink {
        display: inline-block;
        color: #333 !important;
        text-decoration: underline;
        text-underline-offset: 3px;
    }

    #loginPopup button,
    #loginPopup .submit-btn {
        width: 100%;
        min-height: 52px;
        border-radius: 7px;
        background: #a10d14;
        font-size: 16px;
        font-weight: 700;
    }

    #loginPopup button:hover,
    #loginPopup button:focus-visible {
        background: #820a10;
        transform: none;
        outline: 3px solid rgba(161, 13, 20, 0.18);
        outline-offset: 2px;
    }

    #closeLoginPopUp,
    #returnToLogin {
        position: absolute;
        top: max(12px, env(safe-area-inset-top));
        z-index: 20;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 42px !important;
        min-height: 42px !important;
        height: 42px;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid #dedede !important;
        border-radius: 50% !important;
        background: #f6f6f6 !important;
        color: #222;
        float: none;
        line-height: 0;
    }

    #closeLoginPopUp {
        right: 16px;
    }

    #closeLoginPopUp svg,
    #returnToLogin svg {
        display: block;
        width: 22px;
        height: 22px;
        margin: 0;
        flex: 0 0 22px;
        fill: #222;
    }

    #returnToLogin {
        display: none !important;
        left: 16px;
    }

    #loginPopup.recovery-active #returnToLogin {
        display: flex !important;
    }

    #loginPopup.recovery-active::before {
        display: none;
    }

    .recoverOldAccountContainer {
        top: auto;
        left: auto;
    }

    .searchUserContainer {
        gap: 2px;
        margin-top: 28px;
    }

    .userList {
        max-height: 38dvh;
        margin-top: 16px;
        padding: 6px;
        background: #f5f5f5;
    }

    .userResult {
        width: 100%;
        box-sizing: border-box;
        border-radius: 6px;
        box-shadow: none;
    }

    .continueAfterAccountFoundButton {
        position: static;
        margin-top: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loginContainer {
        animation: none;
    }
}
