/* Login / registration card (catalog/view/javascript/login_modal.js). Uses the site's dark theme. */
.sd-login-modal {
   position: fixed;
   inset: 0;
   z-index: 10050;
   display: none;
   align-items: center;
   justify-content: center;
   padding: 15px;
}

.sd-login-modal.is-open {
   display: flex;
}

body.sd-login-modal-open {
   overflow: hidden;
}

.sd-login-modal__overlay {
   position: absolute;
   inset: 0;
   background: rgba(0, 0, 0, 0.65);
}

.sd-login-modal__body {
   position: relative;
   width: 100%;
   max-width: 560px;
   max-height: calc(100vh - 30px);
   overflow-y: auto;
   border-radius: 25px;
   background: #2D2D2D;
   border: 1px solid rgba(255, 255, 255, 0.25);
   box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
   animation: sdLoginModalIn 0.2s ease-out;
}

/* Registration has two columns of fields, like the page. */
.sd-login-modal__body:has([data-login-modal-pane="register"].is-active) {
   max-width: 900px;
}

@keyframes sdLoginModalIn {
   from { opacity: 0; transform: translateY(15px); }
   to { opacity: 1; transform: none; }
}

.sd-login-modal__card {
   padding: clamp(1.25rem, 0.875rem + 1.6vw, 2.5rem);
}

.sd-login-modal__close {
   position: absolute;
   top: 15px;
   right: 15px;
   padding: 0;
   border: 0;
   background: none;
   color: #fff;
   cursor: pointer;
   line-height: 1;
}

.sd-login-modal__close::before {
   font-size: 28px;
}

.sd-login-modal__tabs {
   display: flex;
   gap: 10px;
   margin: 0 40px clamp(1.25rem, 1.063rem + 0.8vw, 1.875rem) 0;
}

.sd-login-modal__tab {
   flex: 1 1 0;
   padding: 10px 15px;
   border: 1px solid #fff;
   border-radius: 35px;
   background: none;
   color: #fff;
   font-family: "Open Sans", sans-serif;
   font-size: clamp(1rem, 0.963rem + 0.16vw, 1.125rem);
   font-weight: 700;
   cursor: pointer;
   transition: 0.3s;
}

.sd-login-modal__tab.is-active,
.sd-login-modal__tab:hover {
   border-color: var(--mainColor);
   background: var(--mainColor);
}

.sd-login-modal__pane {
   display: none;
}

.sd-login-modal__pane.is-active {
   display: block;
}

.sd-login-modal__form {
   display: flex;
   flex-direction: column;
   align-items: center;
}

.sd-login-modal__form .sd-personal-area__row {
   max-width: none;
}

.sd-login-modal__form .in-el {
   margin-bottom: clamp(1.25rem, 1.063rem + 0.8vw, 1.563rem);
}

.sd-login-modal__form .sd-personal-area__button {
   min-width: 200px;
   margin-top: 5px;
   margin-bottom: 15px;
}

.sd-login-modal__form .sd-personal-area__button[disabled] {
   opacity: 0.6;
   cursor: default;
}

.sd-login-modal__forgotten {
   font-size: 16px;
}

/* Registration (Simple form inside the card). */
.sd-login-modal__register .sd-personal-area {
   padding: 0;
}

.sd-login-modal__register .sd-personal-area .title-h3 {
   display: none;
}

.sd-login-modal__register .sd-personal-area__button {
   margin-bottom: 0;
}

.sd-login-modal__soc {
   display: flex;
   justify-content: center;
   align-items: center;
   gap: 20px;
   margin-top: 20px;
   padding-top: 20px;
   border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.sd-login-modal__soc:empty {
   display: none;
}

.sd-login-modal__loading {
   width: 40px;
   height: 40px;
   margin: 60px auto;
   border: 3px solid rgba(255, 255, 255, 0.25);
   border-top-color: var(--mainColor, #fff);
   border-radius: 50%;
   animation: sdLoginModalSpin 0.8s linear infinite;
}

@keyframes sdLoginModalSpin {
   to { transform: rotate(360deg); }
}

@media (max-width: 767px) {
   .sd-login-modal__register .sd-personal-area__row--col-2 {
      grid-template-columns: 1fr;
   }
}
