/**
 * 錦威機械科技 - Toast通知系統樣式
 * v1.0.0
 */

/* Toast容器 */
.toast-container {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}

/* 預設為右上角位置 */
.toast-container {
    top: 1rem;
    right: 1rem;
}

/* Toast通知本體 */
.toast {
    min-width: 280px;
    max-width: 350px;
    margin-bottom: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    overflow: hidden;
}

/* 顯示狀態 */
.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* 不同類型的Toast樣式 */
.toast-success {
    background-color: #d1fae5;
    border-left: 4px solid #10b981;
    color: #065f46;
}

.toast-error {
    background-color: #fee2e2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.toast-warning {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.toast-info {
    background-color: #fdf8f3;
    border-left: 4px solid #b87333;
    color: #8b4e2a;
}

/* 關閉按鈕 */
.toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    margin-left: 0.5rem;
    padding: 0;
    color: currentColor;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

/* 確認對話框樣式 */
.toast-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toast-modal-backdrop.show {
    opacity: 1;
}

.toast-confirm-dialog {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 90%;
    max-width: 400px;
    padding: 1.5rem;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast-confirm-dialog.show {
    transform: scale(1);
    opacity: 1;
}

.toast-confirm-content p {
    margin-bottom: 1.5rem;
    color: #1f2937;
    font-size: 1rem;
    text-align: center;
}

.toast-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.toast-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toast-btn-cancel {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.toast-btn-cancel:hover {
    background-color: #e5e7eb;
}

.toast-btn-confirm {
    background-color: #b87333;
    color: white;
    border: 1px solid transparent;
}

.toast-btn-confirm:hover {
    background-color: #8b4e2a;
}
