/* ------------------------------------------- Popup 1. Popup 2. Popup Close 3. Popup Content 4. Popup Login 5. Popup Newsletter 6. Popup Video 7. Popup Product 8. Off Canvas ---------------------------------------------- */ // issue: not optimized newsletter, (newsletter,login,quickview) // 1. Popup .mfp-wrap { z-index: 3000; } .mfp-bg { z-index: 3000; background: #000; opacity: 0; transition: opacity 0.3s ease-out; &.mfp-ready { opacity: 0.7; } } .mfp-container { padding: 4rem 2rem; } .mfp-preloader { margin-top: 0; } .mfp-preloader .d-loading:before { background: none; } // 2. Popup Close .mfp-fade.mfp-bg.mfp-ready { opacity: 0.6125; } .mfp-bg.mfp-removing, .mfp-bg.mfp-removing.mfp-fade { opacity: 0; } .mfp-product .mfp-content > .product { box-shadow: 0 10px 20px 5px rgba(0, 0, 0, 0.2); } .mfp-ready .product.skeleton-body { box-shadow: none; } .mfp-close { transform: rotateZ(45deg); transition: transform 0.3s; opacity: 1; width: 18px; height: 18px; text-indent: if-ltr(-9999px, 9999px); .mfp-wrap & { top: 20px; #{$right}: 20px; } .mfp-content & { top: -25px; #{$right}: 0; } .mfp-image-holder &, .mfp-iframe-holder & { top: 15px; #{$right}: 0; } // .mfp-removing &, // issue span { display: none; } &::before, &::after { content: ""; display: block; position: absolute; background: #fff; width: 2px; height: 100%; top: 0; left: calc(50% - 1px); } &::before { width: 100%; height: 2px; top: calc(50% - 1px); left: 0; } &:hover, &:focus { transform: rotateZ(135deg) scale(1.5); } } // 3. Popup Content .mfp-content > * { position: relative; margin: auto; background: var(--alpha-change-color-light-1); box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.1); opacity: 0; .mfp-ready & { opacity: 1; } .mfp-removing & { opacity: 0; } } .mfp-counter:not(:empty) { background: rgba(0, 0, 0, 0.3); padding: 3px 10px; color: var(--alpha-white-color); } img.mfp-img { max-height: calc(100vh - 100px) !important; } // 4. Popup Login .login-popup { max-width: 525px; margin-left: auto; margin-right: auto; padding: 3rem 5rem 2.5rem; .login, .register { display: block; } .tab-pane { padding-top: 3.5rem; } .nav-link { padding: 0 0 1px; color: var(--alpha-change-color-dark-1); font-size: 1.8rem; font-weight: 500; letter-spacing: 0; line-height: 3; opacity: 0.5; transition: color 0.3s, border 0.3s, background 0.3s, opacity 0.3s; &.active, &:hover { opacity: 1; } } .nav > li { &:not(:last-child) { margin-#{$right}: 1px; } &.show > a, > .active { color: var(--alpha-change-color-dark-1); border-color: var(--alpha-primary-color); } } .tab-pane { padding: 2.1rem 0 0; } form { margin-bottom: 2.3rem; } .social-login { margin-bottom: 1.7rem; p { display: flex; position: relative; align-items: center; margin-bottom: 2rem; font-size: 1.3rem; &::before { margin-#{$right}: 2rem; } &::after { margin-#{$left}: 2rem; } &::before, &::after { flex: 1; content: ""; height: 1px; background: var(--alpha-change-light-border-color); } } } .social-icon { color: var(--alpha-body-color); &.framed { border-color: var(--alpha-light-color); } &:last-child { margin-#{$right}: 0; } } .d-loading:before { background: transparent; } } @include mq(md, max) { .login-popup { padding: 3.5rem 3rem; } } .mfp-login .mfp-preloader { max-width: 50rem; transform: translateY(-50%); width: calc(100% - 42px); margin-left: auto; margin-right: auto; } .login-popup .d-loading { background: transparent; } .mfp-login.offcanvas-type { .mfp-container { padding: 0; animation: 0.4s ease-out slideInRight; } .mfp-content { height: 100%; } .mfp-preloader { overflow: hidden; width: 40rem; transform: none; height: 100%; top: 0; #{$right}: 0; margin: 0; #{$left}: auto; } .login-popup { position: relative; width: 36rem; height: 100%; margin: side-values(0 0 0 auto); padding-left: 3rem; padding-right: 3rem; background: #fff; overflow: hidden auto; } } @include mq(sm, max) { .mfp-login.offcanvas-type .login-popup { width: 29.5rem; padding: 2rem; } } // 5. Popup Newsletter .mfp-alpha { .mfp-content { width: 100%; height: 100%; display: inline-flex; } .mfp-container { animation-duration: 0.55s; animation-fill-mode: none; padding: 0; } .popup { max-width: 90%; position: relative; margin: 0; background: transparent; } .alpha-popup-content { display: flex; background-color: var(--alpha-change-color-light-1); overflow: hidden; height: 100%; > * { flex: 0 0 100%; max-width: 100%; } } } .mfp-popup-template .mfp-preloader { max-width: 60rem; transform: translateY(-50%); margin-left: auto; margin-right: auto; height: 39rem; background: #fff; transition: max-width 0.3s; } // 6. Popup Video .mfp-video-popup { .mfp-content { max-width: 1000px; } video { width: 100%; } } .mfp-figure { line-height: normal; } // 7. Popup Product .mfp-ready + .mfp-product .product { opacity: 1; } .mfp-product { overflow-x: hidden; &.mfp-zoom { cursor: pointer; } .mfp-container { padding: 4rem 3rem 2rem; } .mfp-content, .mfp-preloader { max-width: 88rem; width: 100%; margin: auto; } .mfp-preloader { transform: translateY(-50%); width: calc(100% - 6rem); } div.woocommerce-product-gallery { margin-bottom: 0; } .product { opacity: 0; transition: opacity 0.3s; background: var(--alpha-change-color-light-1); padding: 3rem 1.5rem; min-height: 40rem; margin-bottom: 3rem; &.row { width: 100%; margin-left: 0; margin-right: 0; } > .col-md-6 { padding-left: 15px; padding-right: 15px; } } .quantity-wrapper { label { display: none; } .quantity { margin-#{$right}: 1rem; } } .woocommerce-grouped-product-list-item { .product-name { width: 120px; label { font-size: 1.4em; } } .price-column .price { font-size: 1.6em; } .product-quantity { width: 90px; } .quantity-wrapper .quantity { margin-#{$right}: 0; width: 9em; height: 4.5em; button.quantity-minus { #{$left}: 0.5rem; } button.quantity-plus { #{$right}: 0.5rem; } } } .product-single div.summary { padding-#{$left}: 0; } .mfp-close { position: absolute; top: -2.7rem; #{$right}: 0; } @include mq(md) { .product-gallery { margin-bottom: 0; } &:not(.mfp-offcanvas) .summary { position: absolute; width: calc(100% - 30px); overflow-y: auto; padding-bottom: 0; height: 100%; max-height: 600px; } } @include mq(md, max) { .product { padding: 2rem 0.5rem; } .summary { margin-top: 2rem; padding-bottom: 1rem; } } } .mfp-preloader > .product { margin-bottom: 1rem; } // Zoom Product .mfp-zoom { .mfp-container, &.mfp-bg { opacity: 0; -webkit-backface-visibility: hidden; transition: all 0.3s ease-out; } &.mfp-ready .mfp-container { opacity: 1; } &.mfp-ready.mfp-bg { opacity: 0.4; } &.mfp-removing .mfp-container, &.mfp-removing.mfp-bg { opacity: 0; } .mfp-content { transform: translate(25%); transition: transform 0.35s linear; } &.zoom-start3 .mfp-content { transform: none; } .mfp-figure { -webkit-backface-visibility: hidden; backface-visibility: hidden; clip-path: inset(30px 50% 140px 30px); &.vertical { clip-path: inset(30px 50% 30px 120px); } } .mfp-content .product { opacity: 1; height: 100%; } } .mfp-figure:after { content: none; } img.mfp-img { padding: 0; } @include mq(lg) { .mfp-figure.vertical { .col-md-6:first-child { overflow: hidden; } .mfp-img { margin-#{$left}: 110px; width: calc(100% - 110px); } .thumbs { position: absolute; top: 0; left: 10px; width: 110px; } } } .mfp-figure:not(.vertical) .thumbs { display: flex; > img { flex: 0 0 25%; max-width: 25%; } } .mfp-animated-image { box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.15); margin: 5px; } .product-quickview-loading { &.product { padding: 2.5rem 1.5rem; } img { width: 100%; border: 5px solid transparent; } .product { padding: 2.5rem; } } .mfp-image-holder .mfp-close { width: 18px; top: -30px; color: transparent; } // Load Animation .mfp-anim { .summary > * { opacity: 0; transform: translateY(30px); transition: transform 0.55s cubic-bezier(0.2, 0.75, 0.5, 1), opacity 0.55s cubic-bezier(0.2, 0.75, 0.5, 1); transition-delay: 0.35s; } .summary > :nth-child(1) { transition-delay: 0.05s; } .summary > :nth-child(2) { transition-delay: 0.1s; } .summary > :nth-child(3) { transition-delay: 0.15s; } .summary > :nth-child(4) { transition-delay: 0.2s; } .summary > :nth-child(5) { transition-delay: 0.25s; } .summary > :nth-child(6) { transition-delay: 0.3s; } &.mfp-anim-finish .summary > * { opacity: 1; transform: none; } } // Off Canvas .mfp-offcanvas { .mfp-ready + & { .mfp-container { animation: 0.4s ease-out if-ltr(slideInRight, slideInLeft); } } .mfp-removing + & { .mfp-container { animation: 0.4s ease-in if-ltr(slideOutRight, slideOutLeft); } .mfp-container .mfp-content, .mfp-content > * { opacity: 1; } } .mfp-bg { transition: 0.4s; } .mfp-container { padding: 0; text-align: $right; } .mfp-content { width: 100%; height: 100vh; overflow-y: auto; } .mfp-close { position: fixed; right: 42rem; top: 2rem; background: #fff; border-radius: 50%; width: 30px; height: 30px; &:before, &:after { background: var(--alpha-body-color); transition: transform 0.3s; } &:before { width: 50%; left: 50%; transform: translateX(-50%); } &:after { height: 50%; top: 50%; transform: translateY(-50%); } &:hover, &:focus { transform: rotateZ(45deg); &:before { transform: translateX(-50%) rotateZ(-45deg); } &:after { transform: translateY(-50%) rotateZ(45deg); } } } // Product Quickview div.woocommerce-product-gallery { padding: 0; margin-bottom: 2rem; } .product { width: 40rem; height: 100%; padding: 2.5rem; margin: side-values(0 0 0 auto); overflow-x: hidden; overflow-y: auto; .summary { padding-bottom: 0; } } .mfp-preloader { overflow: hidden; width: 40rem; transform: none; height: 100%; top: 0; right: 0; margin: 0; left: auto; } } @include mq(sm, max) { .mfp-offcanvas { .product { width: 29.5rem; } .mfp-close { right: 0; top: 0.5rem; } } } .product-video-popup { .mfp-content { max-width: 83rem; } video { width: 100%; } } // 8. Off Canvas - For Pages (Cart Compare Wishlist Review Login) .offcanvas { .offcanvas-overlay { position: fixed; #{$left}: 0; width: 100vw; top: -10vh; height: 120vh; background: rgba(0, 0, 0, 0.6); z-index: 9998; opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s; } .offcanvas-content { padding: 3rem; width: 34rem; max-width: 95vw; position: fixed; top: 0; right: 0; height: 100%; min-width: auto; overflow: auto; opacity: 1; visibility: hidden; transition: transform 0.3s, visibility 0.3s; transform: translateX(if-ltr(100%, -100%)); z-index: 9999; background-color: var(--alpha-change-color-light-1); } &.opened .offcanvas-overlay { visibility: visible; opacity: 1; } &.opened .offcanvas-content { visibility: visible; transform: translateX(0); } }