.toast-title {
    font-weight: 700;
}

.toast-message {
    -ms-word-wrap: break-word;
    word-wrap: break-word;
}

.toast-message a,
.toast-message label {
    color: inherit;
    text-decoration: underline;
}

.toast-message a:hover {
    opacity: 0.8;
    text-decoration: none;
}

.toast-close-button {
    position: relative;
    right: -0.3em;
    top: -0.3em;
    float: right;
    font-size: 20px;
    font-weight: bold;
    color: inherit;
    opacity: 0.4;
    line-height: 1;
}

.toast-close-button:hover,
.toast-close-button:focus {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    opacity: 0.8;
}

.rtl .toast-close-button {
    left: -0.3em;
    float: left;
    right: 0.3em;
}

/*Additional properties for button version
 iOS requires the button element instead of an anchor tag.
 If you want the anchor version, it requires `href="#"`.*/
button.toast-close-button {
    padding: 0;
    cursor: pointer;
    background: transparent;
    border: 0;
    -webkit-appearance: none;
}

/* 容器：不管指定哪個 position class，一律固定在畫面正中央（比照登入成功彈窗樣式） */
#toast-container {
    position: fixed;
    z-index: 999999;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: auto;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

#toast-container * {
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

#toast-container>div {
    position: relative;
    pointer-events: auto;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    padding: 12px 22px 12px 16px;
    width: auto;
    max-width: min(90vw, 420px);
    border-radius: 16px;
    background-color: #ffffff;
    background-repeat: no-repeat;
    border: 2px solid var(--accent, #22c55e);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: var(--accent, #22c55e);
    font-weight: 700;
    opacity: 1;
}

#toast-container>div.rtl {
    direction: rtl;
    padding: 12px 16px 12px 22px;
}

#toast-container>div:hover {
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26);
    cursor: pointer;
}

/* 圖示：用純 CSS 圓形色塊 + SVG 符號取代舊版左側背景圖示 */
#toast-container>div::before {
    content: '';
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--accent, #22c55e);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
}

#toast-container>.toast-success {
    --accent: #22c55e;
}

#toast-container>.toast-success::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 12 9 17 20 6'/%3E%3C/svg%3E") !important;
}

#toast-container>.toast-error {
    --accent: #ef4444;
}

#toast-container>.toast-error::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E") !important;
}

#toast-container>.toast-warning {
    --accent: #f59e0b;
}

#toast-container>.toast-warning::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='7' x2='12' y2='13'/%3E%3Ccircle cx='12' cy='17' r='0.6' fill='white' stroke='white'/%3E%3C/svg%3E") !important;
}

#toast-container>.toast-info {
    --accent: #3b82f6;
}

#toast-container>.toast-info::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='11' x2='12' y2='17'/%3E%3Ccircle cx='12' cy='7' r='0.6' fill='white' stroke='white'/%3E%3C/svg%3E") !important;
}

.toast {
    background-color: #ffffff;
}

.toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.15);
}

/*Responsive Design*/
@media all and (max-width: 480px) {
    #toast-container {
        width: 92%;
    }

    #toast-container>div {
        max-width: 100%;
        padding: 12px 16px;
    }
}