/* WooCommerce Plugin */

.form-row [type="text"],
.form-row [type="tel"],
.form-row [type="password"],
.form-row [type="email"],
.form-row textarea {
    display: block;
    width: 100%;
}

.woocommerce-form {
    font-size: 1.3rem ;
    label {
        margin-bottom: 8px;
    }
}

.button {
    display: inline-block;
    border: 2px solid var(--alpha-change-border-color);
    outline: 0;
    border-radius: 0;
    padding: 1.3rem 2.7rem;
    font-weight: 600;
    font-size: 1.4rem ;
    line-height: 1.2;
    text-transform: uppercase;
    text-align: center;
    transition: color 0.3s, border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
    white-space: nowrap;
    cursor: pointer;

    @include button-variant(var(--alpha-primary-color), var(--alpha-primary-color-hover)); // issue : duplicate

    &.loading {
        opacity: .3;
    }

    &[disabled] {
        cursor: not-allowed;
        pointer-events: none;
    }
}

// Login Form
.form-footer label {
    margin-bottom: 0;
}

.lost_password {
    margin-bottom: 0;

    a {
        color: $danger-color;
        &:hover,
        &:focus {
            color: lighten($danger-color, 10%);
        }
    }
}

.woocommerce-privacy-policy-link {
    color: var(--alpha-primary-color);

    &:hover {
        text-decoration: underline;
    }
}

form {
    .submit-status {
        margin: 2rem 0 0;
        color: var(--alpha-danger-color);
    }
}

form.lost_reset_password {
    width: 450px;
    margin: 0 auto;
    border: 1px solid var(--alpha-change-border-color-light);
    padding: 5rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.woocommerce > .login-popup {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    background: var(--alpha-change-color-light-1);
}

.woocommerce-form .button,
.woocommerce-form-row .button {
    display: block;
    width: 100%;
}

.woocommerce-form-login {
    p {
        font-size: inherit;
        line-height: 1.84;
        &:empty:before {
            content: none;
        }
    }
    
    .form-row {
        &:nth-child(2) {
            margin-bottom: 2rem;
        }
        label {
            display: inline-block;
            margin-bottom: 8px;
            font-size: 1.4rem;
        }
        span {
            vertical-align: middle;
        }
        .form-control {
            height: 3.7rem;
        }
        .input-text {
            background: var(--alpha-change-color-light-1);
        }
        input {
            margin-#{$right}: .5rem;
            &[type="radio"] {
                vertical-align: sub;
            }
        } 
    }
    .user-role {
        margin: 2.7rem 0 2.5rem;
        .radio:first-child {
            margin-bottom: 1.2rem;
        }        
    }

    .custom-checkbox {
        display: flex;
        align-items: center;
        input[type="checkbox"] {
            margin-#{$right}: 1rem;
        }
        label {
            margin-bottom: 0;
        }
    }

    .form-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1.3rem;
        font-size: 1.2rem ;

        p {
            margin-bottom: 6px;
            line-height: inherit;
        }
    }

    .button {
        padding: 1rem;
    }

    .lost-link {
        text-align: $right;
        color: $danger-color;
        &:hover {
            text-decoration: underline;
        }
    }

    .social-login {
        margin-bottom: 2.5rem;
        color: var(--alpha-grey-color);

        p {
            margin-bottom: 8px;
            font-size: 1.2rem ;
        }
    }

    .social-icon {
        color: var(--alpha-body-color);

        &.framed {
            border-color: var(--alpha-change-color-light-3);
        }
    }

    .custom-checkbox {
        margin-bottom: 2.5rem;
        line-height: initial;
    }

    .woocommerce-password-strength {
        margin: 10px 0;
        padding: 8px;
        color: var(--alpha-change-color-light-1);
        text-align: center;
        background: var(--alpha-primary-color);

        &.short {
            background: $alert-color;
        }

        &.bad {
            background: $danger-color;
        }

        &.good {
            background: $success-color;
        }
    }

    .woocommerce-password-hint {
        font-size: 1.2rem ;
        line-height: 1.86;
    }

    .title {
        font-size: 1.3rem;
        font-weight: normal;
        color: var(--alpha-body-color);
        margin-bottom: 1.5rem;
    }
}

// Sidebar Widgets
.sidebar .widget .wc-layered-nav-term,
.sidebar .widget .with-checkbox li,
.sidebar .widget .yith-wcan-list li {
    padding: 0;

    > a,
    &.empty span {
        position: relative;
        display: block;
        color: var(--alpha-dark-body-color);
        line-height: 1.2;
        padding: side-values(1rem 0 1rem 2.8rem);

        &:hover {
            color: var(--alpha-primary-color);
        }

        &::before {
            content: '';
            position: absolute;
            border: 1px solid;
            border-radius: $corner-sm;
            width: 18px;
            height: 18px;
            top: 50%;
            transform: translateY(-50%);
            #{$left}: 0;
            color: var(--alpha-grey-color);
            font-size: .7em;
            font-weight: 900;
            font-family: 'Font Awesome 5 Free';
            text-align: center;
            line-height: 16px;

            // @include only-for-retina(1.5) {
            //     text-indent: 0;
            // }
        }
    }
}

.sidebar .widget .wc-block-product-categories a {
    color: var(--alpha-dark-body-color);
}

.sidebar .widget .wc-layered-nav-term.chosen > a::before,
.sidebar .widget .with-checkbox li.chosen > a::before,
.sidebar .widget .yith-wcan-list li.chosen > a::before {
    content: "\f00c";
    color: var(--alpha-change-color-light-1);
    background-color: var(--alpha-primary-color);
    border-color: var(--alpha-primary-color);
}

#yith-wcwl-popup-message {
    display: none !important;
}

.woocommerce .alert {
    display: block;

    i {
        margin-#{$right}: 5px;
    }

    .btn:first-child {
        margin-#{$right}: 1rem;
    }

    .button {
        width: auto;
    }

    .btn.btn-close {
        top: 50%;
        transform: translateY(-50%);
    }

    .close-icon {
        width: 14px;
        height: 14px;
    }

    .close-icon:before,
    .close-icon:after {
        color: inherit;
    }
}

.woocommerce-product-gallery .woocommerce-product-gallery__trigger {
    display: none;
}

// WCML
.wcml-spinner {
    display: none;
}
.entry-summary .product_meta .wcml_currency_switcher {
    display: none;
}

// Woocommerce Info
.main-content > .woocommerce-info {
    padding-top: 1.8rem;
}

@include mq(lg) {
    .left-sidebar.closed ~ .main-content > .woocommerce-info {
        padding-#{$left}: 10rem;
    }
}

// Sub Pages
.woocommerce .alert {
    // color: inherit;
    margin-bottom: 2rem;
    background: transparent;
    border: 1px solid;

    + .alert {
        margin-top: -1rem;
    }
}

.woocommerce {
    .alert-success a:not(.btn),
    .alert-success i {
        color: var(--alpha-success-color);
    }
    .alert-danger a:not(.btn),
    .alert-danger i {
        color: var(--alpha-danger-color);
    }
    .alert-danger>.button {
        display: none;
    }
    .alert-info a:not(.btn),
    .alert-info i {
        color: var(--alpha-info-color);
    }

    .showcoupon + .btn-close,
    .showlogin + .btn-close {
        display: none;
    }
}

// Overlay
.blockOverlay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% + 10px) !important;

    background: var(--alpha-change-color-light-1) !important;
    opacity: 0.6 !important;
}
.woocommerce-cart .blockMsg,
.woocommerce-checkout .blockMsg {
    opacity: 0;
}
.woocommerce .add_to_wishlist .blockOverlay {
    background: transparent !important;
}
.woocommerce .blockUI.blockOverlay::before {
    background: none;
}
// YITH Compare
.yith_woocompare_colorbox #cboxTopCenter, .yith_woocompare_colorbox #cboxTopLeft, .yith_woocompare_colorbox #cboxTopRight, .yith_woocompare_colorbox #cboxMiddleLeft, .yith_woocompare_colorbox #cboxMiddleRight, .yith_woocompare_colorbox #cboxBottomLeft, .yith_woocompare_colorbox #cboxBottomCenter, .yith_woocompare_colorbox #cboxBottomRight {
    background: transparent;
    width: 0;
    height: 0;
}

// Rating Form
.comment-form-rating {
	color: var(--alpha-change-color-dark-1);
	margin-bottom: 2.2rem;
}
.stars {
	display: inline-block;
	margin: side-values(0 0 0 1rem);
	line-height: 1;

	.comment-respond & {
        margin-bottom: 0;
        vertical-align: 1px;
	}

	span {
		display: flex;
		position: relative;
		height: 1.2rem;
		font-size: 1.2rem;
	}

	a {
		color: var(--alpha-change-color-light-3);
		text-indent: if-ltr(-9999px, 9999px);
		width: 1.4rem;
	}

	a:before {
		content: '';
		position: absolute;
		#{$left}: 0;
		height: 14px;
		line-height: 1;
		font-family: $framework-font;
		text-indent: 0;
		overflow: hidden;
		white-space: nowrap;
		letter-spacing: 0.2em;
	}

	a.active:before,
	a:hover:before {
		content: "\e986" "\e986" "\e986" "\e986" "\e986";
		color: var(--alpha-secondary-color);
	}

	.star-1 {
		z-index: 10;
	}

	.star-2 {
		z-index: 9;
	}

	.star-3 {
		z-index: 8;
	}

	.star-4 {
		z-index: 7;
	}

	.start-5 {
		z-index: 6;
	}

	.star-1:before {
		width: 20%;
	}

	.star-2:before {
		width: 40%;
	}

	.star-3:before {
		width: 60%;
	}

	.star-4:before {
		width: 80%;
	}

	.star-5:before {
		content: "\e986" "\e986" "\e986" "\e986" "\e986";
	}
}

@include mq('320px', 'max') {
    .page-content .woocommerce-form-login .lost_password {
        margin-left: 0;
    }
}

.woocommerce-store-notice.demo_store {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    width: 300px;
    padding: 15px 10px;
    margin: 0;
    border: 1px solid var(--alpha-change-border-color);
    border-radius: 2px;
    background: #fff;
    font-size: 13px;
    text-align: center;
}

.alpha-rounded-skin {
	.form-row [type=email],
	.form-row [type=password],
	.form-row [type=tel],
	.form-row [type=text],
    .form-row textarea,
    .woocommerce .button,
    .woocommerce .btn {
		border-radius: $corner-sm;
	}
}