a.wpr-quantity-update,
a.wpr-subscription-update,
a.wpr-add-product {
    margin: 2px;
}

a.wpr-add-product {
    margin-bottom: 10px;
}

#wpr-subscription-pause-submit,
#wpr-subscription-pause-cancel,
a.wpr-quantity-save,
a.wpr-cancel-qty {
    margin: 2px 2px 2px 0;
}

#wpr-subscription-pause-submit {
    margin-right: 0;
}

#wpr-subscription-pause-cancel {
    margin-left: 0;
}

.wpr-subscription-update-submit,
.wpr-subscription-cancel-submit {
    margin: 2px;
}

.wpr-subscription-update-submit {
    margin-right: 0;
}

.wpr-subscription-cancel-submit {
    margin-left: 0;
}

.wpr-add-new-subscription {
    text-align: center;
    max-width: 100%;
    height: 100%;
    /*    overflow: auto;*/
    position: relative;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: stretch;
    align-items: flex-start;
}

.wpr-add-new-subscription > div {
    margin-bottom: 20px;
    flex: 0 0 330px;
    width: 30%;
}

.wpr-add-new-subscription .wpr-product-image img {
    display: inline-block;
}

.wpr-subscription-cancel-add {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    float: right;
    padding: 7px;
    cursor: pointer;
    text-decoration: none;
}

.ssd-display-notification {
    border: 1px solid rgba(0, 124, 75, 1);
    padding: 5px 10px;
    margin: 5px 0;
    border-radius: 5px;
    color: rgba(0, 124, 75, 1);
    display: block;
    clear: both;
}

.wpr-add-new-form-content .ssd-display-notification {
    margin-top: 100px;
}

.ssd-error-display-notification {
    border: 1px solid rgba(255, 0, 0, 1);
    padding: 5px 10px;
    margin: 5px 0;
    border-radius: 5px;
    color: rgba(255, 0, 0, 1);
    display: block;
    clear: both;
}


.ssd-modal-wrapper {
    z-index: 9999;
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    display: none;
    overflow-x: scroll;
    background: #EEEEEE;
}

#ssd-modal-content {
    padding-top: 180px;
    height: 100%;
    background: #EEEEEE;
}

.ssd-hide {
    display: none;
}

.ssd-show {
    display: block !important;
}

.ssd-modal {
    position: relative;
    padding: 20px 15px;
    background: #EEEEEE;
    color: #000000;
    text-align: center;
    height: 100vh;
}

.ssd-close-modal,
.ssd-shipping-close-modal {
    display: inline-flex;
    align-items: center;
    margin: 0;
    float: none;
}

.ssd-close-modal-link {
    cursor: pointer;
}

.ssd-search-modal-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    box-sizing: border-box;
    padding: 24px 24px 18px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ssd-search-modal-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 1100px;
    margin: 0 auto;
}

.ssd-search-modal {
    display: flex;
    flex: 1 1 420px;
    align-items: center;
    gap: 10px;
    max-width: 560px;
}

.ssd-search-modal #ssd-search-products,
.ssd-search-products {
    flex: 1 1 auto;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    height: 42px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-size: 14px;
    line-height: 1.2;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ssd-search-modal #ssd-search-products:focus,
.ssd-search-products:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
    outline: none;
}

.ssd-search-modal #ssd-submit-search,
#ssd-submit-search {
    flex: 0 0 auto;
    margin: 0;
    cursor: pointer;
}

.ssd-product-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    max-width: 1100px;
    margin: 14px auto 0;
    padding: 0;
    clear: both;
}

.ssd-product-filter-field {
    display: inline-flex;
    flex: 0 1 180px;
    margin: 0;
    min-width: 150px;
    max-width: 220px;
}

.ssd-product-filter-field select,
.ssd-product-filter {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 40px;
    margin: 0;
    padding: 0 36px 0 14px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    color: #111827;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.ssd-product-filter-field select:hover,
.ssd-product-filter:hover {
    border-color: #a78bfa;
    background-color: #faf5ff;
}

.ssd-product-filter-field select:focus,
.ssd-product-filter:focus {
    border-color: #8b5cf6;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
    outline: none;
}

@media (max-width: 782px) {
    #ssd-modal-content {
        padding-top: 220px;
    }

    .ssd-search-modal-header {
        padding: 18px 16px 14px;
    }

    .ssd-search-modal {
        flex: 1 1 100%;
        max-width: none;
    }

    .ssd-product-filter-field {
        flex: 1 1 calc(50% - 10px);
        max-width: none;
    }
}

#ssd-modal-content .bos4w-or-subscribe,
#ssd-shipping-modal-content .bos4w-or-subscribe {
    display: none;
}

.ssd-shipping-modal-wrapper {
    z-index: 9999;
    position: fixed;
    top: 35%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 400px;
    bottom: 0;
    display: none;
    overflow-x: scroll;
    background: #EEEEEE;
}

.ssd-shipping-modal {
    position: relative;
    padding: 20px 15px;
    background: #EEEEEE;
    color: #000000;
    text-align: center;
}

/* Cancellation Reasons Modal - Independent System */
.ssd-cancellation-modal-wrapper {
    z-index: 9999;
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    display: none;
    overflow-x: scroll;
    background: rgba(0, 0, 0, 0.6);
    align-items: center;
    justify-content: center;

    &.ssd-hide {
        display: none;
    }

    &.ssd-show {
        display: flex !important;
    }

    .ssd-cancellation-modal {
        position: relative;
        padding: 35px 20px 20px 20px;
        border-radius: 10px;
        text-align: center;
        height: auto;
        color: #000;
        background-color: rgba(255, 255, 255, .9);
        border: 1px solid #adadad;
        backdrop-filter: blur(10px);
        width: 100%;
        max-width: 350px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;

        @media screen and (max-width: 768px) {
            width: 100%;
            min-width: 100vw;
            height: 100vh;
            min-height: 100vh;
            max-height: 100vh;
            overflow-y: auto;
            padding: 40px 20px;
            box-sizing: border-box;
            border-radius: 0;
            border: none;
        }
    }

    #ssd-cancellation-modal-content {
        height: auto;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        width: 100%;

        .ssd-cancellation-reasons-wrap {
            width: 100%;
        }
    }

    h3 {
        text-align: center;
        font-weight: bold;
        margin: 0 0 15px 0;
    }

    p {
        font-size: 14px;
        margin: 0;
    }

    .ssd-cancellation-close-modal {
        position: absolute;
        top: 5px;
        right: 5px;
    }

    .ssd-reasons-list {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 15px;

        .ssd-reason-item {
            position: relative;
            margin: 0 !important;
            padding: 0;
            background: rgba(255, 255, 255, .7);
            border-radius: 6px;
            border: 1px solid #fff;
            backdrop-filter: blur(10px);
            cursor: pointer;
            transition: .34s;

            label {
                margin: 0;
                padding: 8px 12px;
                justify-content: center;
            }

            span {
                font-size: 16px;
                text-align: center;
                color: #2d2d2d;
                transition: .34s;
            }

            input {
                position: absolute;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                opacity: 0;
                visibility: hidden;
            }

            &:hover {
                background-color: rgb(0, 0, 0);
                border-color: #000;

                span {
                    color: #fff;
                }
            }

            &.selected {
                background-color: rgb(0, 0, 0);
                border-color: #000;

                span {
                    color: #fff;
                }
            }
        }
    }

    #ssd-confirm-cancel {
        width: 100%;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 14px;
        border-radius: 4px;
        background-color: var(--wc-primary);
        color: var(--wc-primary-text);
        border: none;
        transition: .34s;
        cursor: pointer;

        &:hover {
            transform: scale(1.05, 1.05);
        }

        &:disabled {
            pointer-events: none;
            opacity: .6;
        }
    }

}

#wpr-shipping-type-subscription #shipping_method {
    margin-top: 20px;
}

.disable-click {
    pointer-events: none;
    opacity: .7;
}

@media screen and (min-width: 768px) and (max-width: 1100px) {
    .wpr-add-new-subscription {
        flex-wrap: wrap;
    }

    .wpr-add-new-subscription > div {
        flex: 45%;
    }
}

@media screen and (max-width: 768px) {
    .wpr-add-new-subscription {
        flex-wrap: wrap;
    }

    .wpr-add-new-subscription > div {
        flex: 100%;
    }
}

@media screen and (min-width: 800px) {
    #wpr-subscription-pause-submit,
    #wpr-subscription-pause-cancel,
    .pause_subscription {
        margin-bottom: 4px !important;
    }
}

@media screen and (max-width: 560px) {
    div[class^="wpr-variable-form-"] td.label,
    div[class^="wpr-variable-form-"] td.value {
        display: inline-block;
        width: 100%;
    }
}

@media screen and (max-width: 460px) {
    a.wpr-quantity-save,
    a.wpr-cancel-qty {
        width: 100%;
        margin: 2px 0 2px;
    }
}

.wpr-subscription-add-submit {
    margin-bottom: 10px;
}
