/* 自定義彈窗樣式 */

/* 彈窗遮罩 */
.custom-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.custom-modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 彈窗容器 */
.custom-modal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

/* 彈窗頭部 */
.custom-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-modal-icon {
    font-size: 24px;
    line-height: 1;
}

.custom-modal-icon.info {
    color: #2196F3;
}

.custom-modal-icon.success {
    color: #4CAF50;
}

.custom-modal-icon.warning {
    color: #FF9800;
}

.custom-modal-icon.error {
    color: #F44336;
}

.custom-modal-icon.confirm {
    color: #FF9800;
}

.custom-modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin: 0;
    flex: 1;
}

/* 彈窗內容 */
.custom-modal-body {
    padding: 24px;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
    max-height: 400px;
    overflow-y: auto;
}

/* 彈窗底部按鈕區 */
.custom-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.custom-modal-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.custom-modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.custom-modal-btn:active {
    transform: translateY(0);
}

.custom-modal-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.custom-modal-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.custom-modal-btn.success {
    background: #4CAF50;
    color: white;
}

.custom-modal-btn.success:hover {
    background: #45a049;
}

.custom-modal-btn.danger {
    background: #F44336;
    color: white;
}

.custom-modal-btn.danger:hover {
    background: #e53935;
}

.custom-modal-btn.secondary {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.custom-modal-btn.secondary:hover {
    background: #eeeeee;
}

/* 動畫 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 響應式 */
@media (max-width: 768px) {
    .custom-modal {
        width: 95%;
        max-width: none;
    }

    .custom-modal-header {
        padding: 16px 20px;
    }

    .custom-modal-body {
        padding: 20px;
        font-size: 14px;
    }

    .custom-modal-footer {
        padding: 12px 20px;
        flex-direction: column;
    }

    .custom-modal-btn {
        width: 100%;
    }
}
