/* ---------- 自訂對話框樣式 ---------- */

/* 遮罩層 */
.sg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: sgModalFadeIn 0.2s ease-out;
}

@keyframes sgModalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 對話框容器 */
.sg-modal {
    background: #322e34;
    color: #fff;
    border-radius: 10px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: sgModalSlideUp 0.3s ease-out;
}

@keyframes sgModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 對話框標題 */
.sg-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #fff;
    text-align: center;
}

/* 對話框內容 */
.sg-modal-content {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #e0e0e0;
    white-space: pre-line; /* 保留換行 */
}

/* 餘額資訊高亮 */
.sg-modal-content .highlight {
    color: #14b8a6;
    font-weight: 700;
}

.sg-modal-content .warning {
    color: #f87171;
    font-weight: 700;
}

/* 按鈕容器 */
.sg-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* 按鈕樣式 */
.sg-modal-btn {
    padding: 10px 24px;
    border: 0;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
}

/* 主要按鈕（確認） */
.sg-modal-btn-primary {
    background: #14b8a6;
    color: #fff;
}

.sg-modal-btn-primary:hover {
    background: #0d9488;
    transform: translateY(-2px);
}

/* 次要按鈕（取消） */
.sg-modal-btn-secondary {
    background: #555;
    color: #fff;
}

.sg-modal-btn-secondary:hover {
    background: #666;
}

/* 警告按鈕（用於錯誤訊息） */
.sg-modal-btn-warning {
    background: #f87171;
    color: #fff;
}

.sg-modal-btn-warning:hover {
    background: #ef4444;
    transform: translateY(-2px);
}

/* 單按鈕時佔滿寬度 */
.sg-modal-buttons.single .sg-modal-btn {
    flex: 1;
}

/* 圖示 */
.sg-modal-icon {
    font-size: 48px;
    text-align: center;
    margin-bottom: 16px;
}

.sg-modal-icon.success {
    color: #14b8a6;
}

.sg-modal-icon.error {
    color: #f87171;
}

.sg-modal-icon.warning {
    color: #fbbf24;
}

.sg-modal-icon.info {
    color: #60a5fa;
}
