/* 共用提示彈窗 */
.swal2-container.spica-alert-container {
    padding: 16px;
}

.swal2-container.spica-alert-container.swal2-backdrop-show,
.swal2-container.spica-alert-container.swal2-noanimation {
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(3px);
}

.swal2-popup.spica-alert-popup {
    --alert-icon-size: 10px;
    --alert-icon-gap: 37px;
    --alert-title-size: 18px;
    --alert-text-size: 10px;
    --alert-action-gap: 22px;
    --alert-button-width: 160px;
    --alert-button-height: 28px;
    --alert-button-size: 12px;

    box-sizing: border-box;
    width: 400px;
    max-width: 100%;
    padding: 40px 28px 28px;
    border-radius: 10px;
    background: #f8f9fa;
    color: #1b2637;
    font-family: inherit;
}

.spica-alert-popup .swal2-icon {
    box-sizing: border-box;
    width: var(--alert-icon-size);
    height: var(--alert-icon-size);
    margin: 0 auto var(--alert-icon-gap);
    font-size: var(--alert-icon-size);
}

.spica-alert-popup .swal2-icon.swal2-warning,
.spica-alert-popup .swal2-icon.swal2-success,
.spica-alert-popup .swal2-icon.swal2-error {
    border: 0;
}

.spica-alert-popup .spica-alert-svg {
    display: block;
    width: var(--alert-icon-size);
    height: var(--alert-icon-size);
    background: center / contain no-repeat;
}

.spica-alert-popup .swal2-warning .spica-alert-svg {
    background-image: url('../images/icon/warning.svg');
}

.spica-alert-popup .swal2-success .spica-alert-svg {
    background-image: url('../images/icon/success.svg');
}

.spica-alert-popup .swal2-error .spica-alert-svg {
    background-image: url('../images/icon/error.svg');
}

.spica-alert-popup .swal2-title,
.spica-alert-popup .swal2-html-container {
    min-width: 0;
    padding: 0;
    color: inherit;
    overflow-wrap: anywhere;
}

.spica-alert-popup .swal2-title {
    margin: 0;
    font-size: var(--alert-title-size);
    font-weight: 700;
    line-height: 1.25;
}

.spica-alert-popup .swal2-html-container {
    overflow: visible;
    margin: 6px 0 0;
    font-size: var(--alert-text-size);
    line-height: 1.4;
}

.spica-alert-popup .swal2-actions {
    max-width: 100%;
    flex-wrap: wrap;
    gap: 8px;
    margin: var(--alert-action-gap) auto 0;
}

.spica-alert-popup .swal2-styled {
    box-sizing: border-box;
    width: var(--alert-button-width);
    max-width: 100%;
    min-height: var(--alert-button-height);
    margin: 0;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: var(--alert-button-size);
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

.spica-alert-popup .swal2-actions.spica-alert-two-actions {
    flex-flow: row nowrap;
    width: min(254px, 100%);
    gap: clamp(6px, 2vw, 14px);
}

.spica-alert-popup .spica-alert-two-actions .swal2-styled {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding-inline: 0;
}

.spica-alert-popup .swal2-styled.swal2-confirm,
.spica-alert-popup .swal2-styled.swal2-cancel {
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: var(--alert-button-size);
    font-weight: 400;
}

.spica-alert-popup .swal2-styled.swal2-confirm {
    background: #1b2637;
}

.spica-alert-popup .swal2-styled.swal2-cancel {
    background: rgb(28 40 58 / 50%);
}

.spica-alert-popup .swal2-styled.swal2-confirm:focus {
    box-shadow: none;
}

.spica-alert-popup .swal2-styled.swal2-confirm:focus-visible {
    outline: 2px solid #1b2637;
    outline-offset: 3px;
}

/* 手機與平板 */
@media (max-width: 768px) {
    .swal2-popup.spica-alert-popup {
        --alert-icon-size: 20px;
        --alert-icon-gap: 57px;
        --alert-title-size: 20px;
        --alert-text-size: 14px;
        --alert-action-gap: 36px;
        --alert-button-width: 200px;
        --alert-button-height: 44px;
        --alert-button-size: 20px;

        width: 280px;
        min-height: 328px;
        padding: 65px 30px 40px;
        border-radius: 20px;
        color: #1c283a;
        font-family: "Noto Sans TC", sans-serif;
    }

    .swal2-popup.spica-alert-popup:has(.spica-alert-svg) {
        padding-top: 40px;
    }

    .spica-alert-popup .swal2-icon:has(.spica-alert-svg) {
        width: 70px;
        height: 70px;
        align-items: center;
        justify-content: center;
        margin-bottom: 32px;
    }


    .spica-alert-popup .swal2-title {
        line-height: 1.2;
        opacity: .9;
    }

    .spica-alert-popup .swal2-html-container {
        margin-top: 8px;
        line-height: 1.2;
    }

    .spica-alert-popup .swal2-styled.swal2-confirm,
    .spica-alert-popup .swal2-styled.swal2-cancel {
        border-radius: 36px;
        line-height: 15.5px;
    }

    .spica-alert-popup .swal2-styled.swal2-confirm {
        background-color: #1c283a;
    }
}

/* 手機與平板關閉按鈕 */
@media (max-width: 768px) {
    .swal2-popup.spica-alert-popup .swal2-close {
        display: none !important;
    }
}


/* 共用提示彈窗按鈕互動 */
.swal2-popup.spica-alert-popup .swal2-close:focus,
.swal2-popup.spica-alert-popup .swal2-confirm:focus {
    box-shadow: none;
}

.swal2-popup.spica-alert-popup .swal2-close:focus:not(:focus-visible),
.swal2-popup.spica-alert-popup .swal2-confirm:focus:not(:focus-visible) {
    outline: none;
}

.swal2-popup.spica-alert-popup .swal2-close:focus-visible {
    border-radius: 50%;
    outline: 2px solid #6c7683;
    outline-offset: -2px;
}

@media (hover: hover) {
    .swal2-popup.spica-alert-popup .swal2-actions:not(.swal2-loading) .swal2-confirm:hover {
        background: #cdd1d6;
        color: #1b2637;
    }
}


/* 共用提示彈窗關閉按鈕 */
.swal2-popup.spica-alert-popup .swal2-close {
    position: absolute;
    inset: 0 0 auto auto;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    color: #a8afb8;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
}

@media (min-width: 992px) {
    .spica-header-actions .spica-desktop-search-btn,
    .spica-header-actions .spica-member-btn {
        width: 36px;
        height: 36px;
    }
}


/* 電腦版共用提示彈窗 */
@media (width > 768px) {
    .swal2-popup.spica-alert-popup {
        --alert-icon-size: 20px;
        --alert-icon-gap: 48px;
        --alert-title-size: 36px;
        --alert-text-size: 20px;
        --alert-action-gap: 48px;
        --alert-button-width: 320px;
        --alert-button-height: 56px;
        --alert-button-size: 24px;

        width: 800px;
        min-height: 417px;
        padding: 56px min(70px, 6vw);
        border-radius: 20px;
        color: #1c283a;
        font-family: "Noto Sans TC", sans-serif;
    }

    .spica-alert-popup .swal2-icon:has(.spica-alert-svg) {
        width: 70px;
        height: 70px;
        align-items: center;
        justify-content: center;
    }

    .spica-alert-popup .swal2-title {
        line-height: 1.2;
        opacity: .9;
    }

    .spica-alert-popup .swal2-html-container {
        margin-top: 16px;
        line-height: 1.2;
    }

    .spica-alert-popup .swal2-actions.spica-alert-two-actions {
        width: min(660px, 100%);
        gap: 20px;
    }

    .spica-alert-popup .swal2-styled.swal2-confirm,
    .spica-alert-popup .swal2-styled.swal2-cancel {
        padding: 4px 15px;
        border-radius: 36px;
        line-height: 15.5px;
    }

    .spica-alert-popup .swal2-styled.swal2-confirm {
        background-color: #1c283a;
    }

    .swal2-popup.spica-alert-popup .swal2-close {
        width: 50px;
        height: 50px;
        color: rgb(28 40 58 / 30%);
        font-size: 28px;
    }
}
