/* "Add to cart" popup of the subscription page (_SubscriptionCartModal). Prefixed with sc- */

.sc-overlay {
    --sc-blue: #0078D4;
    --sc-blue-dark: #005FB8;
    --sc-blue-soft: #EAF3FC;
    --sc-text: #1F1F1F;
    --sc-muted: #6B6B6B;
    --sc-border: #E6E6E6;
    --sc-card: #FFFFFF;
    --sc-red: #B3261E;
    --sc-red-soft: #FDE7E9;
    --sc-green: #0E7A0D;
    --sc-green-soft: #E7F4E4;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    direction: rtl;
    color: var(--sc-text);
}

    .sc-overlay[hidden] {
        display: none;
    }

.darkmode .sc-overlay {
    --sc-text: #F2F2F2;
    --sc-muted: #B5B5B5;
    --sc-border: #333333;
    --sc-card: #1C1C1C;
    --sc-blue-soft: #10263A;
    --sc-red: #FF99A4;
    --sc-red-soft: #3A1717;
    --sc-green: #6CCB5F;
    --sc-green-soft: #12301A;
}

body.sc-open {
    overflow: hidden;
}

.sc-overlay *, .sc-overlay *::before, .sc-overlay *::after {
    box-sizing: border-box;
}

.sc-dialog {
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    background: var(--sc-card);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    .sc-dialog form {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

.sc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--sc-border);
}

    .sc-head h2 {
        font-size: 16px;
        font-weight: 600;
        margin: 0;
    }

.sc-close {
    border: 0;
    background: none;
    font-size: 26px;
    line-height: 1;
    color: var(--sc-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

    .sc-close:hover {
        background: rgba(127, 127, 127, 0.12);
    }

.sc-body {
    padding: 18px 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    .sc-body[hidden], .sc-foot[hidden] {
        display: none;
    }

.sc-product {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sc-product-img {
    width: 56px;
    height: 56px;
    flex: none;
    border-radius: 12px;
    border: 1px solid var(--sc-border);
    background-position: center;
    background-size: cover;
}

.sc-product-title {
    font-size: 15px;
    font-weight: 500;
}

.sc-product-meta {
    color: var(--sc-muted);
    font-size: 13px;
    margin-top: 2px;
}

    .sc-product-meta span:empty {
        display: none;
    }

    .sc-product-meta span + span::before {
        content: "· ";
    }

.sc-desc {
    background: var(--sc-blue-soft);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.9;
}

    .sc-desc p:last-child, .sc-note p:last-child {
        margin-bottom: 0;
    }

.sc-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    font-weight: normal;
}

    .sc-field > span:first-child {
        font-size: 13px;
        color: var(--sc-muted);
    }

    .sc-field em {
        color: var(--sc-red);
        font-style: normal;
    }

    .sc-field input {
        width: 100%;
        height: 44px;
        border: 1px solid var(--sc-border);
        border-radius: 10px;
        padding: 0 12px;
        font-size: 14px;
        background: transparent;
        color: var(--sc-text);
        text-align: left;
    }

        .sc-field input:focus {
            outline: none;
            border-color: var(--sc-blue);
            box-shadow: 0 0 0 3px var(--sc-blue-soft);
        }

.sc-password {
    position: relative;
    display: block;
}

    .sc-password input {
        padding-right: 64px;
    }

.sc-eye {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: none;
    color: var(--sc-blue);
    font-family: inherit;
    font-size: 12px;
    padding: 6px 8px;
    cursor: pointer;
}

.sc-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    font-weight: normal;
    line-height: 1.8;
    margin: 0;
    cursor: pointer;
}

    .sc-check input {
        width: 18px;
        height: 18px;
        margin: 3px 0 0;
        flex: none;
        accent-color: var(--sc-blue);
    }

    .sc-check a {
        color: var(--sc-blue);
    }

.sc-note {
    color: var(--sc-muted);
    font-size: 12px;
    line-height: 1.9;
}

.sc-error {
    background: var(--sc-red-soft);
    color: var(--sc-red);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
}

    .sc-error[hidden] {
        display: none;
    }

.sc-foot {
    display: flex;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--sc-border);
}

.sc-btn {
    flex: 1;
    height: 44px;
    border: 1px solid var(--sc-border);
    border-radius: 10px;
    background: none;
    color: var(--sc-text);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

    .sc-btn:hover {
        background: rgba(127, 127, 127, 0.08);
        color: var(--sc-text);
    }

    .sc-btn.is-primary {
        flex: 2;
        background: var(--sc-blue);
        border-color: var(--sc-blue);
        color: #fff;
    }

        .sc-btn.is-primary:hover {
            background: var(--sc-blue-dark);
            color: #fff;
        }

    .sc-btn.is-loading {
        opacity: 0.7;
        cursor: progress;
    }

.sc-done {
    align-items: center;
    text-align: center;
    padding-block: 28px;
}

    .sc-done h3 {
        font-size: 17px;
        margin: 0;
    }

    .sc-done p {
        color: var(--sc-muted);
        font-size: 13px;
        line-height: 1.9;
        margin: 0;
    }

.sc-done-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--sc-green-soft);
    color: var(--sc-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .sc-done-icon svg {
        width: 28px;
        height: 28px;
    }

@media (max-width: 560px) {
    .sc-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .sc-dialog {
        max-width: none;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
    }
}
